Skip to content

Commit 8321f01

Browse files
committed
SettableTask.checkCompletingThread() only resets marker after match
Issue: SPR-15409 (cherry picked from commit 8cb24e0)
1 parent 7e736b6 commit 8321f01

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ protected void done() {
169169

170170
private boolean checkCompletingThread() {
171171
boolean check = (this.completingThread == Thread.currentThread());
172-
this.completingThread = null; // only first check actually counts
172+
if (check) {
173+
this.completingThread = null; // only first match actually counts
174+
}
173175
return check;
174176
}
175177
}

0 commit comments

Comments
 (0)