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:02:08 +00:00
parent 9791a0327f
commit 596e62398f

View File

@ -540,8 +540,10 @@ class NioDatagramWorker implements Runnable {
} catch (final AsynchronousCloseException e) {
// Doesn't need a user attention - ignore.
channel.currentWriteEvent = evt;
channel.inWriteNowLoop = false;
} catch (final Throwable t) {
channel.currentWriteEvent = null;
channel.inWriteNowLoop = false;
evt.getFuture().setFailure(t);
evt = null;
fireExceptionCaught(channel, t);