Fix timer error

This commit is contained in:
Bastian Schroll 2021-02-03 10:40:38 +01:00 committed by GitHub
parent 985396f7d6
commit 9c2f9c4c18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,9 +61,9 @@ class RepeatedTimer:
"""!Stop the timer worker thread
@return True or False"""
self._event.set()
if self._thread is not None:
logging.debug("stop repeatedTimer: %s", self._thread.name)
self._event.set()
self._thread.join()
return True
logging.warning("repeatedTimer always stopped")