Skip to content

Commit

Permalink
Make sure the thread is not in an interrupted state when cleanup up (f…
Browse files Browse the repository at this point in the history
…ixes #590) (#883)
  • Loading branch information
gnodet authored Oct 24, 2023
1 parent 7cbba19 commit 9a216ca
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@ && getLastBinding().charAt(0) == originalAttributes.getControlChar(ControlChar.V
throw e;
}
} finally {
boolean interrupted = Thread.interrupted();
try {
lock.lock();

Expand All @@ -784,6 +785,9 @@ && getLastBinding().charAt(0) == originalAttributes.getControlChar(ControlChar.V
} finally {
lock.unlock();
startedReading.set(false);
if (interrupted) {
Thread.currentThread().interrupt();
}
}
}
}
Expand Down

0 comments on commit 9a216ca

Please sign in to comment.