Fixed a bug where the future of the write request is sometimes not notified
This commit is contained in:
parent
6e68d6ba4f
commit
9791a0327f
@ -451,12 +451,14 @@ class NioWorker implements Runnable {
|
|||||||
// Doesn't need a user attention - ignore.
|
// Doesn't need a user attention - ignore.
|
||||||
channel.currentWriteEvent = evt;
|
channel.currentWriteEvent = evt;
|
||||||
channel.currentWriteIndex = bufIdx;
|
channel.currentWriteIndex = bufIdx;
|
||||||
|
channel.inWriteNowLoop = false;
|
||||||
|
|
||||||
// But we still need to clean up the pending writes.
|
// But we still need to clean up the pending writes.
|
||||||
cleanUpWriteBuffer(channel, e);
|
cleanUpWriteBuffer(channel, e);
|
||||||
break;
|
break;
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
channel.currentWriteEvent = null;
|
channel.currentWriteEvent = null;
|
||||||
|
channel.inWriteNowLoop = false;
|
||||||
evt.getFuture().setFailure(t);
|
evt.getFuture().setFailure(t);
|
||||||
evt = null;
|
evt = null;
|
||||||
fireExceptionCaught(channel, t);
|
fireExceptionCaught(channel, t);
|
||||||
|
Loading…
Reference in New Issue
Block a user