Skip to content

Commit b060a49

Browse files
committed
only interrupt on InterruptedException.
1 parent 77e074e commit b060a49

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

s2a/src/main/java/io/grpc/s2a/handshaker/S2ATrustManager.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ private void checkPeerTrusted(X509Certificate[] chain, boolean isCheckingClientC
121121
try {
122122
resp = stub.send(reqBuilder.build());
123123
} catch (IOException | InterruptedException e) {
124-
Thread.currentThread().interrupt();
124+
if (e instanceof InterruptedException) {
125+
Thread.currentThread().interrupt();
126+
}
125127
throw new CertificateException("Failed to send request to S2A.", e);
126128
}
127129
if (resp.hasStatus() && resp.getStatus().getCode() != 0) {

0 commit comments

Comments
 (0)