Skip to content

Commit

Permalink
Invoke Thread.currentThread().interrupt() in a InterruptedException b…
Browse files Browse the repository at this point in the history
…lock.
  • Loading branch information
rmehta19 committed Sep 18, 2024
1 parent ef53441 commit c1375bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public void close() {
isDelegateTerminated =
delegate.awaitTermination(DELEGATE_TERMINATION_TIMEOUT.getSeconds(), SECONDS);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
isDelegateTerminated = false;
}
long quietPeriodSeconds = isDelegateTerminated ? 0 : 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ private void checkPeerTrusted(X509Certificate[] chain, boolean isCheckingClientC
try {
resp = stub.send(reqBuilder.build());
} catch (IOException | InterruptedException e) {
Thread.currentThread().interrupt();

This comment has been minimized.

Copy link
@ejona86

ejona86 Sep 18, 2024

Member

We shouldn't interrupt the thread in the case of IOException.

throw new CertificateException("Failed to send request to S2A.", e);
}
if (resp.hasStatus() && resp.getStatus().getCode() != 0) {
Expand Down

0 comments on commit c1375bb

Please sign in to comment.