Stop anyway if the thread is interrupted

This commit is contained in:
Andrea Cavalli 2021-10-05 12:36:47 +02:00
parent 4fa1f94f6b
commit 7ed2df1f4f
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ public final class ResponseReceiver extends Thread implements AutoCloseable {
public void run() {
int[] sortIndex;
try {
while ((!Thread.interrupted() && !closeCalled.get() && !jvmShutdown.get()) || !registeredClients.isEmpty()) {
while (!Thread.interrupted() && ((!closeCalled.get() && !jvmShutdown.get()) || !registeredClients.isEmpty())) {
int resultsCount = NativeClientAccess.receive(clientIds, eventIds, events, 2.0 /*seconds*/);
if (resultsCount <= 0) {