avoid error on resume from standby

This commit is contained in:
woodser 2023-04-30 06:41:15 -04:00
parent 1fdb02bd1f
commit 6030f1dd57

View file

@ -772,9 +772,9 @@ public class XmrWalletService {
wallet.setDaemonConnection(connection);
if (connection != null) wallet.getDaemonConnection().setPrintStackTrace(PRINT_STACK_TRACE);
if (connection != null && !Boolean.FALSE.equals(connection.isConnected())) {
wallet.startSyncing(connectionsService.getRefreshPeriodMs());
new Thread(() -> {
try {
wallet.startSyncing(connectionsService.getRefreshPeriodMs());
wallet.sync();
} catch (Exception e) {
log.warn("Failed to sync main wallet after setting daemon connection: " + e.getMessage());