mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-08-10 08:37:05 +00:00
cancel running services before restart
This commit is contained in:
@@ -99,6 +99,10 @@ public class AppServices {
|
||||
};
|
||||
|
||||
private void restartService(ScheduledService<?> service) {
|
||||
if(service.isRunning()) {
|
||||
service.cancel();
|
||||
}
|
||||
|
||||
if(service.getState() == Worker.State.CANCELLED) {
|
||||
service.reset();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user