From 596e62398fe3a08a41858eaf08fdc43ff6cee659 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Tue, 29 Sep 2009 10:02:08 +0000 Subject: [PATCH] Fixed a bug where the future of the write request is sometimes not notified --- .../org/jboss/netty/channel/socket/nio/NioDatagramWorker.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioDatagramWorker.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioDatagramWorker.java index 958c6ef5c8..f7a5978021 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioDatagramWorker.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioDatagramWorker.java @@ -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);