[#2033] Correctly handle adding of IdleStateHandler after Channel was already active and registered
This commit is contained in:
parent
ec8967f9ff
commit
6bba3c19dd
@ -207,7 +207,7 @@ public class IdleStateHandler extends ChannelHandlerAdapter {
|
||||
|
||||
@Override
|
||||
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
|
||||
if (ctx.channel().isActive() & ctx.channel().isRegistered()) {
|
||||
if (ctx.channel().isActive() && ctx.channel().isRegistered()) {
|
||||
// channelActvie() event has been fired already, which means this.channelActive() will
|
||||
// not be invoked. We have to initialize here instead.
|
||||
initialize(ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user