diff --git a/cmdserver/pjcontroller.py b/cmdserver/pjcontroller.py index 01a7be0..5c55b51 100644 --- a/cmdserver/pjcontroller.py +++ b/cmdserver/pjcontroller.py @@ -35,7 +35,9 @@ def __init__(self, config, mqtt: Optional[MQTT]): from twisted.internet import task self.__looping = task.LoopingCall(self.refresh) logger.info(f'Initiating PJ refresh every 20s') - self.__looping.start(20, now=False) + d = self.__looping.start(20, now=False) + from twisted.python import log + d.addErrback(log.err) def refresh(self) -> Deferred: return threads.deferToThread(self.__update_state)