diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java index 6810a7de70f..40b80ca5950 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpSender.java @@ -462,6 +462,18 @@ public abstract class HttpSender implements AsyncContentProvider.Listener @Override public void succeeded() + { + try + { + process(); + } + catch (Exception x) + { + anyToFailure(x); + } + } + + private void process() throws Exception { HttpExchange exchange = getHttpExchange(); if (exchange == null) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java index 757a6293764..ac557efa3c0 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpSenderOverHTTP.java @@ -18,7 +18,6 @@ package org.eclipse.jetty.client.http; -import java.io.IOException; import java.nio.ByteBuffer; import org.eclipse.jetty.client.HttpClient; @@ -115,7 +114,7 @@ public class HttpSenderOverHTTP extends HttpSender } } } - catch (Throwable x) + catch (Exception x) { LOG.debug(x); content.failed(x); @@ -173,7 +172,7 @@ public class HttpSenderOverHTTP extends HttpSender } } } - catch (IOException x) + catch (Exception x) { LOG.debug(x); content.failed(x);