[#2033] Correctly handle adding of IdleStateHandler after Channel was already active and registered
This commit is contained in:
parent
05c10fae05
commit
7c7acdcaac
@ -207,7 +207,7 @@ public class IdleStateHandler extends ChannelDuplexHandler {
|
||||
|
||||
@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