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( MessageEvent encryptedWrite = new DownstreamMessageEvent(
channel, future, msg, channel.getRemoteAddress()); channel, future, msg, channel.getRemoteAddress());
if (Thread.holdsLock(pendingEncryptedWrites)) { if (Thread.holdsLock(pendingEncryptedWrites)) {
pendingEncryptedWrites.offer(encryptedWrite); offered = pendingEncryptedWrites.offer(encryptedWrite);
} else { } else {
synchronized (pendingEncryptedWrites) { synchronized (pendingEncryptedWrites) {
pendingEncryptedWrites.offer(encryptedWrite); offered = pendingEncryptedWrites.offer(encryptedWrite);
} }
} }
offered = true; assert offered;
} else { } else {
HandshakeStatus handshakeStatus = result.getHandshakeStatus(); HandshakeStatus handshakeStatus = result.getHandshakeStatus();
switch (handshakeStatus) { switch (handshakeStatus) {