An experimental workaround for infinite blocking SSLEngine
This commit is contained in:
parent
763d0cf809
commit
25a2ade130
@ -645,13 +645,14 @@ public class SslHandler extends FrameDecoder {
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
SSLEngineResult result;
|
SSLEngineResult result;
|
||||||
synchronized (handshakeLock) {
|
synchronized (handshakeLock) {
|
||||||
|
boolean outboundDone = engine.isOutboundDone();
|
||||||
if (initialHandshake && !engine.getUseClientMode() &&
|
if (initialHandshake && !engine.getUseClientMode() &&
|
||||||
!engine.isInboundDone() && !engine.isOutboundDone()) {
|
!engine.isInboundDone() && !outboundDone) {
|
||||||
handshake(channel);
|
handshake(channel);
|
||||||
initialHandshake = false;
|
initialHandshake = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (channel.getCloseFuture().isDone()) {
|
if (outboundDone && !channel.isConnected()) {
|
||||||
ChannelFuture handshakeFuture = this.handshakeFuture;
|
ChannelFuture handshakeFuture = this.handshakeFuture;
|
||||||
if (handshakeFuture != null &&
|
if (handshakeFuture != null &&
|
||||||
handshakeFuture.getCause() != null) {
|
handshakeFuture.getCause() != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user