Fixed NotYetConnectedException

This commit is contained in:
Trustin Lee 2010-01-09 08:44:32 +00:00
parent 052a109bc9
commit 9f12398073

View File

@ -758,6 +758,7 @@ class NioWorker implements Runnable {
selector, channel.getRawInterestOps(), channel); selector, channel.getRawInterestOps(), channel);
} }
if (future != null) { if (future != null) {
channel.setConnected();
future.setSuccess(); future.setSuccess();
} }
} catch (IOException e) { } catch (IOException e) {
@ -772,7 +773,6 @@ class NioWorker implements Runnable {
} }
if (!server) { if (!server) {
channel.setConnected();
if (!((NioClientSocketChannel) channel).boundManually) { if (!((NioClientSocketChannel) channel).boundManually) {
fireChannelBound(channel, localAddress); fireChannelBound(channel, localAddress);
} }