mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-16 23:16:33 +00:00
HttpClient should retry requests in case of ConnectionClosedException
This commit is contained in:
parent
d950fa6ed0
commit
285674e4ff
@ -42,6 +42,7 @@
|
||||
import org.apache.hc.core5.annotation.Contract;
|
||||
import org.apache.hc.core5.annotation.ThreadingBehavior;
|
||||
import org.apache.hc.core5.concurrent.CancellableDependency;
|
||||
import org.apache.hc.core5.http.ConnectionClosedException;
|
||||
import org.apache.hc.core5.http.HttpRequest;
|
||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||
import org.apache.hc.core5.util.Args;
|
||||
@ -87,6 +88,7 @@ protected DefaultHttpRequestRetryHandler(
|
||||
* <li>InterruptedIOException</li>
|
||||
* <li>UnknownHostException</li>
|
||||
* <li>ConnectException</li>
|
||||
* <li>ConnectionClosedException</li>
|
||||
* <li>SSLException</li>
|
||||
* </ul>
|
||||
*
|
||||
@ -95,7 +97,11 @@ protected DefaultHttpRequestRetryHandler(
|
||||
*/
|
||||
public DefaultHttpRequestRetryHandler(final int retryCount) {
|
||||
this(retryCount,
|
||||
InterruptedIOException.class, UnknownHostException.class, ConnectException.class, SSLException.class);
|
||||
InterruptedIOException.class,
|
||||
UnknownHostException.class,
|
||||
ConnectException.class,
|
||||
ConnectionClosedException.class,
|
||||
SSLException.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user