Skip to content

Commit f7a0c03

Browse files
committed
log exceptions in _autoTickThread and continue
1 parent 18cee14 commit f7a0c03

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pysyncobj/syncobj.py

Lines changed: 6 additions & 1 deletion
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)