mirror of
https://github.com/boldsuck/haveno.git
synced 2025-01-24 08:35:51 +00:00
fix UserThread.await() hanging on error
This commit is contained in:
parent
821d949fa7
commit
153f708a7c
1 changed files with 7 additions and 2 deletions
|
@ -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 a new issue