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

Commit 775a848

Browse files
authored
fix: retry SSLException (#183)
1 parent 4b91692 commit 775a848

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

google-cloud-core/src/main/java/com/google/cloud/BaseServiceException.java

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.util.Objects;
2727
import java.util.Set;
2828
import java.util.concurrent.ExecutionException;
29+
import javax.net.ssl.SSLException;
2930
import javax.net.ssl.SSLHandshakeException;
3031

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

0 commit comments

Comments
 (0)