From 9791a0327febb355f4ddc9257d94ed2412fe23f5 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Tue, 29 Sep 2009 10:01:51 +0000 Subject: [PATCH] Fixed a bug where the future of the write request is sometimes not notified --- src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java index 54bf6419c0..4956b05b75 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java @@ -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);