Skip to content

Commit

Permalink
Fixes #12313 - Jetty 12 ee9/ee10 doesn't invoke callbacks when h2 cli…
Browse files Browse the repository at this point in the history
…ent sends RST_STREAM.

* Removed unnecessary calls to EE9's `HttpChannel.abort()`.

Signed-off-by: Simone Bordet <[email protected]>
  • Loading branch information
sbordet committed Oct 10, 2024
1 parent e75b294 commit b9a6911
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,6 @@ private HttpInput.Content intercept()
// do not try to produce new raw content to get a fresher error
// when the special content was generated by the interceptor.
_error = true;
if (_httpChannel.getResponse().isCommitted())
_httpChannel.abort(error);
}
if (LOG.isDebugEnabled())
LOG.debug("interceptor generated special content {}", this);
Expand All @@ -446,9 +444,6 @@ private HttpInput.Content intercept()
// do not try to produce new raw content to get a fresher error
// when the special content was caused by the interceptor throwing.
_error = true;
Response response = _httpChannel.getResponse();
if (response.isCommitted())
_httpChannel.abort(failure);
if (LOG.isDebugEnabled())
LOG.debug("interceptor threw exception {}", this, x);
return _transformedContent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,9 @@ public boolean handle()
if (LOG.isDebugEnabled())
LOG.debug("Could not perform ERROR dispatch, aborting", x);
if (_state.isResponseCommitted())
{
abort(x);
}
else
{
try
Expand Down Expand Up @@ -1440,18 +1442,10 @@ public void succeeded()
_response.getHttpOutput().completed(null);
super.failed(x);
}

@Override
public void failed(Throwable th)
{
abort(x);
super.failed(x);
}
});
}
else
{
abort(x);
super.failed(x);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,10 @@ else if (_state == State.CLOSE)

if (LOG.isDebugEnabled())
LOG.debug("onWriteComplete({},{}) {}->{} c={} cb={} w={}",
last, failure, state, stateString(), BufferUtil.toDetailString(closeContent), closedCallback, wake);
last, failure, state, stateString(), BufferUtil.toDetailString(closeContent), closedCallback, wake, failure);

try
{
if (failure != null)
_channel.abort(failure);

if (closedCallback != null)
{
if (failure == null)
Expand Down Expand Up @@ -1335,7 +1332,6 @@ public void failed(Throwable x)
{
if (LOG.isDebugEnabled())
LOG.debug("Unable to send resource {}", resource, x);
_channel.abort(x);
callback.failed(x);
}
}
Expand Down

0 comments on commit b9a6911

Please sign in to comment.