mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-30 12:26:19 -04:00
fix shut down of trade and wallet services in seed node
This commit is contained in:
parent
58506b02f5
commit
adcd5da431
@ -151,23 +151,23 @@ public abstract class ExecutableForAppWithP2p extends HavenoExecutable {
|
|||||||
UserThread.runAfter(() -> System.exit(HavenoExecutable.EXIT_SUCCESS), 1);
|
UserThread.runAfter(() -> System.exit(HavenoExecutable.EXIT_SUCCESS), 1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// shut down trade and wallet services
|
|
||||||
log.info("Shutting down trade and wallet services");
|
|
||||||
injector.getInstance(OfferBookService.class).shutDown();
|
|
||||||
injector.getInstance(TradeManager.class).shutDown();
|
|
||||||
injector.getInstance(BtcWalletService.class).shutDown();
|
|
||||||
injector.getInstance(XmrWalletService.class).shutDown();
|
|
||||||
injector.getInstance(XmrConnectionService.class).shutDown();
|
|
||||||
injector.getInstance(WalletsSetup.class).shutDown();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// shut down trade and wallet services
|
||||||
|
log.info("Shutting down trade and wallet services");
|
||||||
|
injector.getInstance(OfferBookService.class).shutDown();
|
||||||
|
injector.getInstance(TradeManager.class).shutDown();
|
||||||
|
injector.getInstance(BtcWalletService.class).shutDown();
|
||||||
|
injector.getInstance(XmrWalletService.class).shutDown();
|
||||||
|
injector.getInstance(XmrConnectionService.class).shutDown();
|
||||||
|
injector.getInstance(WalletsSetup.class).shutDown();
|
||||||
});
|
});
|
||||||
|
|
||||||
// we wait max 5 sec.
|
// we wait max 5 sec.
|
||||||
UserThread.runAfter(() -> {
|
UserThread.runAfter(() -> {
|
||||||
PersistenceManager.flushAllDataToDiskAtShutdown(() -> {
|
PersistenceManager.flushAllDataToDiskAtShutdown(() -> {
|
||||||
resultHandler.handleResult();
|
resultHandler.handleResult();
|
||||||
log.info("Graceful shutdown caused a timeout. Exiting now.");
|
log.warn("Graceful shutdown caused a timeout. Exiting now.");
|
||||||
UserThread.runAfter(() -> System.exit(HavenoExecutable.EXIT_SUCCESS), 1);
|
UserThread.runAfter(() -> System.exit(HavenoExecutable.EXIT_SUCCESS), 1);
|
||||||
});
|
});
|
||||||
}, 5);
|
}, 5);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user