fix UserThread.await() hanging on error
This commit is contained in:
parent
821d949fa7
commit
153f708a7c
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user