From ec918b78ede5ceaad33a1817c90fb94f6254e186 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 28 Apr 2021 11:46:46 +0200 Subject: [PATCH] followup to public server change on wallet history failure --- src/main/java/com/sparrowwallet/sparrow/AppServices.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/AppServices.java b/src/main/java/com/sparrowwallet/sparrow/AppServices.java index 99983478..a1394a2e 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppServices.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppServices.java @@ -717,9 +717,9 @@ public class AppServices { @Subscribe public void walletHistoryFailed(WalletHistoryFailedEvent event) { - if(Config.get().getServerType() == ServerType.PUBLIC_ELECTRUM_SERVER && connectionService != null && connectionService.isRunning()) { + if(Config.get().getServerType() == ServerType.PUBLIC_ELECTRUM_SERVER && isConnected()) { onlineProperty.set(false); - log.info("Connection to " + Config.get().getServerAddress() + " failed, reconnecting to another server..."); + log.info("Failed to fetch wallet history from " + Config.get().getServerAddress() + ", reconnecting to another server..."); Config.get().changePublicServer(); onlineProperty.set(true); }