From 153f708a7c72fafb0fec6a9f04b10d4f4d801498 Mon Sep 17 00:00:00 2001 From: woodser Date: Thu, 25 Jan 2024 10:56:06 -0500 Subject: [PATCH] fix UserThread.await() hanging on error --- common/src/main/java/haveno/common/UserThread.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/haveno/common/UserThread.java b/common/src/main/java/haveno/common/UserThread.java index 3055a200b2..088f7a5922 100644 --- a/common/src/main/java/haveno/common/UserThread.java +++ b/common/src/main/java/haveno/common/UserThread.java @@ -72,8 +72,13 @@ public class UserThread { } else { CountDownLatch latch = new CountDownLatch(1); execute(() -> { - command.run(); - latch.countDown(); + try { + command.run(); + } catch (Exception e) { + throw e; + } finally { + latch.countDown(); + } }); try { latch.await();