mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-22 19:49:32 +00:00
fix recovery from monerod disconnect
This commit is contained in:
parent
455b1f739c
commit
9ee67a046c
1 changed files with 3 additions and 3 deletions
|
@ -816,12 +816,12 @@ public class XmrWalletService {
|
|||
maybeInitMainWallet();
|
||||
} else {
|
||||
wallet.setDaemonConnection(connection);
|
||||
if (connection != null) wallet.getDaemonConnection().setPrintStackTrace(PRINT_STACK_TRACE);
|
||||
if (connection != null && !Boolean.FALSE.equals(connection.isConnected())) {
|
||||
if (connection != null) {
|
||||
wallet.getDaemonConnection().setPrintStackTrace(PRINT_STACK_TRACE);
|
||||
new Thread(() -> {
|
||||
try {
|
||||
wallet.startSyncing(connectionsService.getRefreshPeriodMs());
|
||||
wallet.sync();
|
||||
if (!Boolean.FALSE.equals(connection.isConnected())) wallet.sync();
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to sync main wallet after setting daemon connection: " + e.getMessage());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue