Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
NEXUS-5447 clear interrupted flag in InterruptableInputStream
Browse files Browse the repository at this point in the history
The wrapper both aborts underlying http request and throws
InterruptedIOException. Leaving Thread interrupted flag on may
trigger unnecessary/unwanted isInterrupted detection in
unrelated code executed by the thread later on.

Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
  • Loading branch information
ifedorenko committed Dec 14, 2012
1 parent b0be15d commit 06b7538
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ public InterruptableInputStream( final InputStream stream )
private void abortIfInterrupted()
throws IOException
{
final Thread thread = Thread.currentThread();
if ( thread.isInterrupted() )
if ( Thread.interrupted() )
{
if ( request != null )
{
Expand Down

0 comments on commit 06b7538

Please sign in to comment.