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

fix(182): retry SSLException #183

Merged
merged 1 commit into from Mar 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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