diff --git a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/AsyncContentProducer.java b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/AsyncContentProducer.java index eee5da5568f1..7137d71fc4fc 100644 --- a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/AsyncContentProducer.java +++ b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/AsyncContentProducer.java @@ -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); @@ -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; diff --git a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannel.java b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannel.java index 130e47d0877c..38d753cf7ef6 100644 --- a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannel.java +++ b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpChannel.java @@ -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 @@ -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); } } diff --git a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpOutput.java b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpOutput.java index 9387a51313d5..e4849605b04a 100644 --- a/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpOutput.java +++ b/jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/HttpOutput.java @@ -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) @@ -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); } }