NETTY-439 Call channelBound/Connected from worker
* Move channelBound() to RegisterTask * Simplify the if block in RegisterTask
This commit is contained in:
parent
beadadecf7
commit
4b9b421af2
@ -49,6 +49,5 @@ final class NioAcceptedSocketChannel extends NioSocketChannel {
|
||||
setConnected();
|
||||
|
||||
fireChannelOpen(this);
|
||||
fireChannelBound(this, getLocalAddress());
|
||||
}
|
||||
}
|
||||
|
@ -786,18 +786,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…
Reference in New Issue
Block a user