fix scheduler behavior on enable / disable

This commit is contained in:
Jakob Ketterl 2021-03-18 21:17:23 +01:00
parent d573561c67
commit 9dcf342b13

View File

@ -231,7 +231,7 @@ class ServiceScheduler(SdrSourceEventClient):
self.source.removeClient(self)
def scheduleSelection(self, time=None):
if self.source.isFailed():
if not self.source.isEnabled() or self.source.isFailed():
return
seconds = 10
if time is not None:
@ -259,7 +259,7 @@ class ServiceScheduler(SdrSourceEventClient):
self.shutdown()
def onDisable(self):
self.shutdown()
self.cancelTimer()
def onEnable(self):
self.scheduleSelection()