Skip to content

Commit 3455d74

Browse files
committed
Stop scheduler when data is received, considering the connection active
Signed-off-by: raccoonback <[email protected]>
1 parent 76cf912 commit 3455d74

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

reactor-netty-http/src/main/java/reactor/netty/http/Http2ConnectionLiveness.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import io.netty.channel.ChannelFuture;
2020
import io.netty.channel.ChannelFutureListener;
2121
import io.netty.channel.ChannelHandlerContext;
22+
import io.netty.handler.codec.http2.Http2DataFrame;
2223
import io.netty.handler.codec.http2.Http2FrameCodec;
2324
import io.netty.handler.codec.http2.Http2FrameWriter;
2425
import io.netty.handler.codec.http2.Http2PingFrame;
@@ -145,6 +146,10 @@ public void receive(Object msg) {
145146
lastReceivedPingTime = System.nanoTime();
146147
}
147148
}
149+
150+
if (msg instanceof Http2DataFrame) {
151+
cancel();
152+
}
148153
}
149154

150155
/**

0 commit comments

Comments
 (0)