Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
fix: retry SSLException (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankyn committed Mar 16, 2020
1 parent 4b91692 commit 775a848
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -26,6 +26,7 @@
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import javax.net.ssl.SSLException;
import javax.net.ssl.SSLHandshakeException;

/** Base class for all service exceptions. */
Expand Down Expand Up @@ -256,6 +257,8 @@ public static boolean isRetryable(boolean idempotent, IOException exception) {
boolean exceptionIsRetryable =
exception instanceof SocketTimeoutException
|| exception instanceof SocketException
|| (exception instanceof SSLException
&& exception.getMessage().contains("Connection has been shutdown: "))
|| (exception instanceof SSLHandshakeException
&& !(exception.getCause() instanceof CertificateException))
|| "insufficient data written".equals(exception.getMessage())
Expand Down

0 comments on commit 775a848

Please sign in to comment.