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();
|
setConnected();
|
||||||
|
|
||||||
fireChannelOpen(this);
|
fireChannelOpen(this);
|
||||||
fireChannelBound(this, getLocalAddress());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -786,18 +786,10 @@ class NioWorker implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!server) {
|
if (server || !((NioClientSocketChannel) channel).boundManually) {
|
||||||
if (!((NioClientSocketChannel) channel).boundManually) {
|
|
||||||
fireChannelBound(channel, localAddress);
|
fireChannelBound(channel, localAddress);
|
||||||
}
|
}
|
||||||
fireChannelConnected(channel, remoteAddress);
|
fireChannelConnected(channel, remoteAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle the channelConnected in the worker thread
|
|
||||||
if (channel instanceof NioAcceptedSocketChannel) {
|
|
||||||
fireChannelConnected(channel, channel.getRemoteAddress());
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user