.
This commit is contained in:
@@ -51,6 +51,9 @@ public class Main {
|
||||
} catch (Exception e) {
|
||||
System.out.println("Error executing command: " + e.getMessage());
|
||||
}
|
||||
|
||||
if (Thread.interrupted())
|
||||
isRunning = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +126,7 @@ public class Main {
|
||||
System.out.println("Result: " + thread.getResult());
|
||||
} catch (InterruptedException e) {
|
||||
System.out.println("Thread was interrupted while awaiting: " + e.getMessage());
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user