Skip to content

Commit fa8438a

Browse files
betanummericfhamme
andauthored
log exceptions in _autoTickThread and continue (#190)
Co-authored-by: Felix Hamme <[email protected]>
1 parent 18cee14 commit fa8438a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pysyncobj/syncobj.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,12 @@ def _autoTickThread(self):
534534
if self.__destroying:
535535
self._doDestroy()
536536
break
537-
self._onTick(self.__conf.autoTickPeriod)
537+
try:
538+
self._onTick(self.__conf.autoTickPeriod)
539+
except Exception:
540+
# log, wait a little and retry
541+
logger.exception('failed _onTick in _autoTickThread')
542+
time.sleep(self.__conf.autoTickPeriod)
538543
except ReferenceError:
539544
pass
540545

0 commit comments

Comments
 (0)