cancel running services before restart

This commit is contained in:
Craig Raw 2020-12-07 10:55:29 +02:00
parent 39d1e686f4
commit 722fd84ec1

View file

@ -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();
}