Fixed another dead lock in SslHandler
This commit is contained in:
parent
ea81870a28
commit
827effe4e2
@ -757,7 +757,11 @@ public class SslHandler extends FrameDecoder implements ChannelDownstreamHandler
|
|||||||
// current thread, calling wrap() will lead to a dead lock
|
// current thread, calling wrap() will lead to a dead lock
|
||||||
// i.e. pendingUnencryptedWrites -> handshakeLock vs.
|
// i.e. pendingUnencryptedWrites -> handshakeLock vs.
|
||||||
// handshakeLock -> pendingUnencryptedLock -> handshakeLock
|
// handshakeLock -> pendingUnencryptedLock -> handshakeLock
|
||||||
if (!Thread.holdsLock(handshakeLock)) {
|
//
|
||||||
|
// There is also a same issue between pendingEncryptedWrites
|
||||||
|
// and pendingUnencryptedWrites.
|
||||||
|
if (!Thread.holdsLock(handshakeLock) &&
|
||||||
|
!Thread.holdsLock(pendingEncryptedWrites)) {
|
||||||
wrap(ctx, channel);
|
wrap(ctx, channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user