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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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