Skip to content

Commit

Permalink
Resetting the Thread's interrupt bit after catching InterruptedExcept…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
Mike DaCosta committed Mar 20, 2020
1 parent 8760ff0 commit 908866f
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 908866f

Please sign in to comment.