Fixed a bug where the future of the write request is sometimes not notified

This commit is contained in:
Trustin Lee 2009-09-29 10:01:51 +00:00
parent 6e68d6ba4f
commit 9791a0327f

View File

@ -451,12 +451,14 @@ class NioWorker implements Runnable {
// Doesn't need a user attention - ignore.
channel.currentWriteEvent = evt;
channel.currentWriteIndex = bufIdx;
channel.inWriteNowLoop = false;
// But we still need to clean up the pending writes.
cleanUpWriteBuffer(channel, e);
break;
} catch (Throwable t) {
channel.currentWriteEvent = null;
channel.inWriteNowLoop = false;
evt.getFuture().setFailure(t);
evt = null;
fireExceptionCaught(channel, t);