NETTY-439 Call channelBound/Connected from worker
* Move channelBound() to RegisterTask * Simplify the if block in RegisterTask
This commit is contained in:
parent
68c9b0feeb
commit
0d78c0508d
@ -47,6 +47,5 @@ final class NioAcceptedSocketChannel extends NioSocketChannel {
|
||||
|
||||
setConnected();
|
||||
fireChannelOpen(this);
|
||||
fireChannelBound(this, getLocalAddress());
|
||||
}
|
||||
}
|
||||
|
@ -776,17 +776,10 @@ class NioWorker implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
if (!server) {
|
||||
if (!((NioClientSocketChannel) channel).boundManually) {
|
||||
fireChannelBound(channel, localAddress);
|
||||
}
|
||||
fireChannelConnected(channel, remoteAddress);
|
||||
}
|
||||
|
||||
// Handle the channelConnected in the worker thread
|
||||
if (channel instanceof NioAcceptedSocketChannel) {
|
||||
fireChannelConnected(channel, channel.getRemoteAddress());
|
||||
if (server || !((NioClientSocketChannel) channel).boundManually) {
|
||||
fireChannelBound(channel, localAddress);
|
||||
}
|
||||
fireChannelConnected(channel, remoteAddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user