[#710] flush() requests made before SSL handshake completion are not executed after completion
- Ensure SslHandler flushes its outbound buffer on handshake completion - Enable SSL in HttpSnoopClient example
This commit is contained in:
parent
d293e6c389
commit
86b777a919
@ -23,6 +23,7 @@ import io.netty.handler.codec.http.HttpClientCodec;
|
||||
import io.netty.handler.codec.http.HttpContentDecompressor;
|
||||
import io.netty.handler.logging.LogLevel;
|
||||
import io.netty.handler.logging.LoggingHandler;
|
||||
import io.netty.handler.ssl.SslHandler;
|
||||
|
||||
import javax.net.ssl.SSLEngine;
|
||||
|
||||
@ -46,8 +47,7 @@ public class HttpSnoopClientInitializer extends ChannelInitializer<SocketChannel
|
||||
SecureChatSslContextFactory.getClientContext().createSSLEngine();
|
||||
engine.setUseClientMode(true);
|
||||
|
||||
// FIXME: Port SslHandler to the new API
|
||||
//p.addLast("ssl", new SslHandler(engine));
|
||||
p.addLast("ssl", new SslHandler(engine));
|
||||
}
|
||||
|
||||
p.addLast("codec", new HttpClientCodec());
|
||||
|
@ -802,6 +802,7 @@ public class SslHandler
|
||||
break;
|
||||
case FINISHED:
|
||||
setHandshakeSuccess();
|
||||
wrapLater = true;
|
||||
continue;
|
||||
case NOT_HANDSHAKING:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user