From 9f123980731de93b45edcbfce6a67ec616db8fad Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Sat, 9 Jan 2010 08:44:32 +0000 Subject: [PATCH] Fixed NotYetConnectedException --- src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ba257ab7ee..9ad832fb97 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 @@ -758,6 +758,7 @@ class NioWorker implements Runnable { selector, channel.getRawInterestOps(), channel); } if (future != null) { + channel.setConnected(); future.setSuccess(); } } catch (IOException e) { @@ -772,7 +773,6 @@ class NioWorker implements Runnable { } if (!server) { - channel.setConnected(); if (!((NioClientSocketChannel) channel).boundManually) { fireChannelBound(channel, localAddress); }