@@ -627,13 +627,6 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
627
627
}
628
628
629
629
protected void decode (ChannelHandlerContext ctx , ByteBuf buffer ) throws InterruptedException {
630
- final boolean rebindInProgress = ctx .channel ().hasAttr (REBIND_ATTRIBUTE )
631
- && ctx .channel ().attr (REBIND_ATTRIBUTE ).get () != null
632
- && ctx .channel ().attr (REBIND_ATTRIBUTE ).get ().equals (RebindState .STARTED );
633
- if (debugEnabled && rebindInProgress ) {
634
- logger .debug ("{} Processing command while rebind is in progress, stack has {} more to process" , logPrefix (),
635
- stack .size ());
636
- }
637
630
638
631
if (pristine ) {
639
632
@@ -720,9 +713,17 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf buffer) throws Interrup
720
713
}
721
714
}
722
715
723
- if (rebindInProgress && stack .isEmpty ()) {
724
- logger .info ("{} Rebind completed at {}" , logPrefix (), LocalTime .now ());
725
- ctx .channel ().attr (REBIND_ATTRIBUTE ).set (RebindState .COMPLETED );
716
+ final boolean rebindInProgress = ctx .channel ().hasAttr (REBIND_ATTRIBUTE )
717
+ && ctx .channel ().attr (REBIND_ATTRIBUTE ).get () != null
718
+ && ctx .channel ().attr (REBIND_ATTRIBUTE ).get ().equals (RebindState .STARTED );
719
+
720
+ if (rebindInProgress ) {
721
+ if (stack .isEmpty ()) {
722
+ logger .info ("{} Rebind completed at {}" , logPrefix (), LocalTime .now ());
723
+ ctx .channel ().attr (REBIND_ATTRIBUTE ).set (RebindState .COMPLETED );
724
+ } else {
725
+ logger .debug ("{} Rebind in progress, {} commands remaining in the stack" , logPrefix (), stack .size ());
726
+ }
726
727
}
727
728
728
729
decodeBufferPolicy .afterDecoding (buffer );
0 commit comments