mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-06 10:09:01 +00:00
ARTEMIS-2821 Stop the timeout future when channel is closed
This commit is contained in:
parent
f8bd4a847b
commit
5621c403ad
@ -101,7 +101,7 @@ public class ProtocolHandler {
|
||||
|
||||
private final boolean httpEnabled;
|
||||
|
||||
private ScheduledFuture timeoutFuture;
|
||||
private ScheduledFuture<?> timeoutFuture;
|
||||
|
||||
private int handshakeTimeout;
|
||||
|
||||
@ -122,6 +122,15 @@ public class ProtocolHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
|
||||
super.channelInactive(ctx);
|
||||
if (handshakeTimeout > 0 && timeoutFuture != null) {
|
||||
timeoutFuture.cancel(true);
|
||||
timeoutFuture = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
|
||||
if (msg instanceof FullHttpRequest) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user