Skip to content

Commit

Permalink
fix: reset the thread's interrupt bit after catching InterruptedExcep…
Browse files Browse the repository at this point in the history
…tion (#1005)
  • Loading branch information
Mike DaCosta committed Mar 20, 2020
1 parent 8760ff0 commit 1ae169e
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -97,6 +97,8 @@ public boolean handleIOException(HttpRequest request, boolean supportsRetry) thr
try {
return BackOffUtils.next(sleeper, backOff);
} catch (InterruptedException exception) {
// Catching InterruptedException clears the thread interrupted bit.
Thread.currentThread().interrupt();
return false;
}
}
Expand Down

0 comments on commit 1ae169e

Please sign in to comment.