mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
cancel running services before restart
This commit is contained in:
parent
39d1e686f4
commit
722fd84ec1
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue