Fixed a bug where SslHandler does not sometimes forward a flush request

This commit is contained in:
Trustin Lee 2012-07-08 15:11:46 +09:00
parent b79e0b0882
commit 3fff8ce1d6

View File

@ -400,8 +400,8 @@ public class SslHandler
} finally { } finally {
if (bytesProduced > 0) { if (bytesProduced > 0) {
in.discardReadBytes(); in.discardReadBytes();
ctx.flush(future);
} }
ctx.flush(future);
} }
} }
@ -753,10 +753,8 @@ public class SslHandler
final ScheduledFuture<?> timeoutFuture = ctx.executor().schedule(new Runnable() { final ScheduledFuture<?> timeoutFuture = ctx.executor().schedule(new Runnable() {
@Override @Override
public void run() { public void run() {
if (future.setSuccess()) { logger.warn(ctx.channel() + "close_notify write attempt timed out. Force-closing the connection.");
logger.warn("close_notify write attempt timed out. Force-closing the connection."); ctx.close(future);
ctx.close(ctx.newFuture());
}
} }
}, 3, TimeUnit.SECONDS); // FIXME: Magic value }, 3, TimeUnit.SECONDS); // FIXME: Magic value