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 Jun 18, 2020
1 parent 2fd2f2b commit e3a2040
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 e3a2040

Please sign in to comment.