Skip to content

Commit caea872

Browse files
authored
---
yaml --- r: 8009 b: refs/heads/tswast-patch-1 c: cc6415e h: refs/heads/master i: 8007: cb4286f
1 parent 352e5d0 commit caea872

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 0c2a6cdff4f03ddb3edf348a80df4a2b5b302a00
60+
refs/heads/tswast-patch-1: cc6415e9f9c1f88119588ba1b09444fa06a2ae0a
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/google-cloud-core/src/main/java/com/google/cloud/BaseServiceException.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@
2626
import java.io.Serializable;
2727
import java.net.SocketException;
2828
import java.net.SocketTimeoutException;
29+
import java.security.cert.CertificateException;
2930
import java.util.Collections;
3031
import java.util.Objects;
3132
import java.util.Set;
33+
import javax.net.ssl.SSLHandshakeException;
3234

3335
/**
3436
* Base class for all service exceptions.
@@ -203,6 +205,8 @@ protected boolean isRetryable(boolean idempotent, Error error) {
203205
protected boolean isRetryable(boolean idempotent, IOException exception) {
204206
boolean exceptionIsRetryable = exception instanceof SocketTimeoutException
205207
|| exception instanceof SocketException
208+
|| (exception instanceof SSLHandshakeException
209+
&& !(exception.getCause() instanceof CertificateException))
206210
|| "insufficient data written".equals(exception.getMessage());
207211
return idempotent && exceptionIsRetryable;
208212
}

0 commit comments

Comments
 (0)