delete and restore account restarts application automatically

added standard input to keepalive loop for issuing commands to daemon

Co-authored-by: duriancrepe <duriancrepe@protonmail.com>
This commit is contained in:
woodser 2023-01-19 19:19:56 -05:00
parent 350d2d5398
commit 9877ba87a4
14 changed files with 181 additions and 73 deletions

View file

@ -108,6 +108,15 @@ public class PersistenceManager<T extends PersistableEnvelope> {
flushAllDataToDisk(completeHandler, true);
}
/**
* Resets the static members of PersistenceManager to restart the application.
*/
public static void reset() {
ALL_PERSISTENCE_MANAGERS.clear();
flushAtShutdownCalled = false;
allServicesInitialized.set(false);
}
// We require being called only once from the global shutdown routine. As the shutdown routine has a timeout
// and error condition where we call the method as well beside the standard path and it could be that those
// alternative code paths call our method after it was called already, so it is a valid but rare case.

View file

@ -21,4 +21,5 @@ import bisq.common.handlers.ResultHandler;
public interface GracefulShutDownHandler {
void gracefulShutDown(ResultHandler resultHandler);
void gracefulShutDown(ResultHandler resultHandler, boolean systemExit);
}