Skip to content

Commit a3c0e0f

Browse files
authored
---
yaml --- r: 5597 b: refs/heads/master c: cc6415e h: refs/heads/master i: 5595: ba9fb31
1 parent 09330c5 commit a3c0e0f

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 0c2a6cdff4f03ddb3edf348a80df4a2b5b302a00
2+
refs/heads/master: cc6415e9f9c1f88119588ba1b09444fa06a2ae0a
33
refs/heads/travis: dae77e558b884bc1b165155482d76c8e40b0fca4
44
refs/heads/gh-pages: 049a9668af6afce3b5840dee8be005b0e6b43506
55
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444

trunk/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)