Code cleanup

This commit is contained in:
Trustin Lee 2009-03-04 14:11:08 +00:00
parent fbfebb1fd9
commit b9f604ca1d

View File

@ -466,13 +466,14 @@ public class SslHandler extends FrameDecoder {
MessageEvent encryptedWrite = new DownstreamMessageEvent(
channel, future, msg, channel.getRemoteAddress());
if (Thread.holdsLock(pendingEncryptedWrites)) {
pendingEncryptedWrites.offer(encryptedWrite);
offered = pendingEncryptedWrites.offer(encryptedWrite);
} else {
synchronized (pendingEncryptedWrites) {
pendingEncryptedWrites.offer(encryptedWrite);
offered = pendingEncryptedWrites.offer(encryptedWrite);
}
}
offered = true;
assert offered;
} else {
HandshakeStatus handshakeStatus = result.getHandshakeStatus();
switch (handshakeStatus) {