fix UserThread.await() hanging on error

This commit is contained in:
woodser 2024-01-25 10:56:06 -05:00
parent 821d949fa7
commit 153f708a7c

View File

@ -72,8 +72,13 @@ public class UserThread {
} else { } else {
CountDownLatch latch = new CountDownLatch(1); CountDownLatch latch = new CountDownLatch(1);
execute(() -> { execute(() -> {
command.run(); try {
latch.countDown(); command.run();
} catch (Exception e) {
throw e;
} finally {
latch.countDown();
}
}); });
try { try {
latch.await(); latch.await();