@Test public void channelClosedDuringGracefulClose() throws Exception { KeepAliveManager manager = newManager(false); addActiveStream(manager); initiateGracefulCloseVerifyGoAwayAndPing(manager); ScheduledTask pingAckTimeoutTask = scheduledTasks.take(); assertThat("Ping ack timeout not scheduled.", pingAckTimeoutTask, is(notNullValue())); manager.channelClosed(); assertThat("Graceful close ping ack timeout not cancelled.", pingAckTimeoutTask.promise.isCancelled(), is(true)); verifyNoOtherActionPostClose(manager); }
void channelClosed() { assert channel.eventLoop().inEventLoop(); cancelIfStateIsAFuture(gracefulCloseState); cancelIfStateIsAFuture(keepAliveState); gracefulCloseState = CLOSED; keepAliveState = CLOSED; }
KeepAliveManager { void channelClosed() { assert channel.eventLoop().inEventLoop(); cancelIfStateIsAFuture(gracefulCloseState); cancelIfStateIsAFuture(keepAliveState); gracefulCloseState = CLOSED; keepAliveState = CLOSED; } }
KeepAliveManager { void channelClosed() { assert channel.eventLoop().inEventLoop(); cancelIfStateIsAFuture(gracefulCloseState); cancelIfStateIsAFuture(keepAliveState); gracefulCloseState = CLOSED; keepAliveState = CLOSED; } KeepAliveManager(final Channel channel, @Nullable final KeepAlivePolicy keepAlivePolicy);   KeepAliveManager(final Channel channel, @Nullable final KeepAlivePolicy keepAlivePolicy,
                     final Scheduler scheduler, final IdlenessDetector idlenessDetector); }
KeepAliveManager { void channelClosed() { assert channel.eventLoop().inEventLoop(); cancelIfStateIsAFuture(gracefulCloseState); cancelIfStateIsAFuture(keepAliveState); gracefulCloseState = CLOSED; keepAliveState = CLOSED; } KeepAliveManager(final Channel channel, @Nullable final KeepAlivePolicy keepAlivePolicy);   KeepAliveManager(final Channel channel, @Nullable final KeepAlivePolicy keepAlivePolicy,
                     final Scheduler scheduler, final IdlenessDetector idlenessDetector);  }
KeepAliveManager { void channelClosed() { assert channel.eventLoop().inEventLoop(); cancelIfStateIsAFuture(gracefulCloseState); cancelIfStateIsAFuture(keepAliveState); gracefulCloseState = CLOSED; keepAliveState = CLOSED; } KeepAliveManager(final Channel channel, @Nullable final KeepAlivePolicy keepAlivePolicy);   KeepAliveManager(final Channel channel, @Nullable final KeepAlivePolicy keepAlivePolicy,
                     final Scheduler scheduler, final IdlenessDetector idlenessDetector);   }