Skip to content

Commit e3a2040

Browse files
author
Mike DaCosta
committed
fix: reset the thread's interrupt bit after catching InterruptedException (#1005)
1 parent 2fd2f2b commit e3a2040

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

google-http-client/src/main/java/com/google/api/client/http/HttpBackOffIOExceptionHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ public boolean handleIOException(HttpRequest request, boolean supportsRetry) thr
9797
try {
9898
return BackOffUtils.next(sleeper, backOff);
9999
} catch (InterruptedException exception) {
100+
// Catching InterruptedException clears the thread interrupted bit.
101+
Thread.currentThread().interrupt();
100102
return false;
101103
}
102104
}

0 commit comments

Comments
 (0)