diff --git a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java index d1eeb9a8f33..107cb15be93 100644 --- a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java +++ b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java @@ -693,14 +693,14 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio if (closed.compareAndSet(CloseState.NOT_CLOSED, CloseState.LOCALLY_CLOSED)) { if (LOG.isDebugEnabled()) - LOG.debug("Closing {}/{}", error, reason); + LOG.debug("Closing {}/{} {}", error, reason, this); closeFrame = newGoAwayFrame(CloseState.LOCALLY_CLOSED, error, reason); control(null, callback, closeFrame); return true; } if (LOG.isDebugEnabled()) - LOG.debug("Ignoring close {}/{}, already closed", error, reason); + LOG.debug("Ignoring close {}/{}, already closed {}", error, reason, this); callback.succeeded(); return false; } @@ -1151,7 +1151,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio return lastRemoteStreamId.get(); } - private void updateLastRemoteStreamId(int streamId) + protected void updateLastRemoteStreamId(int streamId) { Atomics.updateMax(lastRemoteStreamId, streamId); } diff --git a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerSession.java b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerSession.java index aa4cf8c43c7..3f91042fd30 100644 --- a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerSession.java +++ b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerSession.java @@ -106,6 +106,7 @@ public class HTTP2ServerSession extends HTTP2Session implements ServerParser.Lis { if (isClosed()) { + updateLastRemoteStreamId(streamId); reset(new ResetFrame(streamId, ErrorCode.REFUSED_STREAM_ERROR.code), Callback.NOOP); } else