diff --git a/core/src/main/java/haveno/core/api/CoreMoneroConnectionsService.java b/core/src/main/java/haveno/core/api/CoreMoneroConnectionsService.java index e316901e..38109c34 100644 --- a/core/src/main/java/haveno/core/api/CoreMoneroConnectionsService.java +++ b/core/src/main/java/haveno/core/api/CoreMoneroConnectionsService.java @@ -566,13 +566,17 @@ public final class CoreMoneroConnectionsService { if (lastErrorTimestamp != null) { log.info("Successfully fetched daemon info after previous error"); lastErrorTimestamp = null; - if (HavenoUtils.havenoSetup != null) HavenoUtils.havenoSetup.getWalletServiceErrorMsg().set(null); } // update and notify connected state if (!Boolean.TRUE.equals(connectionManager.isConnected())) { connectionManager.checkConnection(); } + + // clear error message + if (Boolean.TRUE.equals(connectionManager.isConnected()) && HavenoUtils.havenoSetup != null) { + HavenoUtils.havenoSetup.getWalletServiceErrorMsg().set(null); + } } catch (Exception e) { // log error message periodically @@ -582,14 +586,16 @@ public final class CoreMoneroConnectionsService { if (DevEnv.isDevMode()) e.printStackTrace(); } - // notify error message - if (HavenoUtils.havenoSetup != null) HavenoUtils.havenoSetup.getWalletServiceErrorMsg().set(e.getMessage()); - // check connection which notifies of changes synchronized (this) { if (connectionManager.getAutoSwitch()) connectionManager.setConnection(connectionManager.getBestAvailableConnection()); else connectionManager.checkConnection(); } + + // set error message + if (!Boolean.TRUE.equals(connectionManager.isConnected()) && HavenoUtils.havenoSetup != null) { + HavenoUtils.havenoSetup.getWalletServiceErrorMsg().set(e.getMessage()); + } } }