Skip to content

Commit 95970ee

Browse files
author
Jérémy James Toussaint
committed
Added while loop end condition
1 parent 09b5303 commit 95970ee

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/com/iexec/core/task/update/TaskUpdateRequestManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void consumeAndNotify() {
7979
return;
8080
}
8181

82-
while (true){
82+
while (!Thread.currentThread().isInterrupted()){
8383
log.info("Waiting requests from publisher [queueSize:{}]", queue.size());
8484
try {
8585
String chainTaskId = queue.take();
@@ -88,7 +88,6 @@ public void consumeAndNotify() {
8888
} catch (InterruptedException e) {
8989
log.error("The unexpected happened", e);
9090
Thread.currentThread().interrupt();
91-
return;
9291
}
9392
}
9493
}

0 commit comments

Comments
 (0)