diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java index 1a770e745e66..ae666b8a6b40 100644 --- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java +++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpChannelState.java @@ -288,7 +288,6 @@ public Runnable onRequest(MetaData.Request request) if (idleTO >= 0 && _oldIdleTimeout != idleTO) _stream.setIdleTimeout(idleTO); - // This is deliberately not serialized to allow a handler to block. return _handlerInvoker; } @@ -1571,7 +1570,7 @@ public ErrorResponseAndCallback(ChannelRequest request, HttpStream stream, Throw _request = request; _stream = stream; _failure = failure; - _status = 500; + _status = HttpStatus.INTERNAL_SERVER_ERROR_500; } @Override @@ -1623,17 +1622,17 @@ public void succeeded() if (needLastWrite) { _stream.send(_request._metaData, responseMetaData, true, null, - Callback.from(() -> httpChannelState._handlerInvoker.failed(failure), + Callback.from(() -> super.failed(failure), x -> { if (ExceptionUtil.areNotAssociated(failure, x)) failure.addSuppressed(x); - httpChannelState._handlerInvoker.failed(failure); + super.failed(failure); })); } else { - httpChannelState._handlerInvoker.failed(failure); + super.failed(failure); } } @@ -1667,13 +1666,7 @@ public void failed(Throwable x) } if (ExceptionUtil.areNotAssociated(failure, x)) failure.addSuppressed(x); - httpChannelState._handlerInvoker.failed(failure); - } - - @Override - public String toString() - { - return "%s@%x".formatted(getClass().getSimpleName(), hashCode()); + super.failed(failure); } }