Make sure Channel connected event is not fired on connect failure. See #249
This commit is contained in:
parent
6995701f20
commit
33f9d55bc4
@ -186,6 +186,11 @@ public class NioWorker extends AbstractNioWorker {
|
|||||||
channel.setConnected();
|
channel.setConnected();
|
||||||
future.setSuccess();
|
future.setSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (server || !((NioClientSocketChannel) channel).boundManually) {
|
||||||
|
fireChannelBound(channel, localAddress);
|
||||||
|
}
|
||||||
|
fireChannelConnected(channel, remoteAddress);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
if (future != null) {
|
if (future != null) {
|
||||||
future.setFailure(e);
|
future.setFailure(e);
|
||||||
@ -197,10 +202,6 @@ public class NioWorker extends AbstractNioWorker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server || !((NioClientSocketChannel) channel).boundManually) {
|
|
||||||
fireChannelBound(channel, localAddress);
|
|
||||||
}
|
|
||||||
fireChannelConnected(channel, remoteAddress);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user