Skip to content

Commit 88fa9e7

Browse files
mark the thread as interrupted again
1 parent 0569624 commit 88fa9e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rxjava-core/src/main/java/rx/Observable.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,10 @@ public void onNext(T args) {
374374
try {
375375
latch.await();
376376
} catch (InterruptedException e) {
377+
// set the interrupted flag again so callers can still get it
378+
// for more information see https://github.com/Netflix/RxJava/pull/147#issuecomment-13624780
379+
Thread.currentThread().interrupt();
380+
// using Runtime so it is not checked
377381
throw new RuntimeException("Interrupted while waiting for subscription to complete.", e);
378382
}
379383

0 commit comments

Comments
 (0)