fix(main): log LoopingCall failures without secondary error

pull/4/head
Rodrigo Pérez 4 months ago
parent 5ad36576cd
commit 2c86aaff6c

@ -137,7 +137,14 @@ def _make_echo_bridges(config: dict) -> dict:
def _looping_errback(logger: logging.Logger, failure):
"""Errback for LoopingCalls (legacy loopingErrHandle). Stops reactor to avoid memory leaks."""
logger.error("(GLOBAL) STOPPING REACTOR TO AVOID MEMORY LEAK: Unhandled error in timed loop.\n %s", failure)
try:
tb = failure.getTraceback() if hasattr(failure, "getTraceback") else str(failure)
except Exception:
tb = repr(failure)
logger.error(
"(GLOBAL) STOPPING REACTOR TO AVOID MEMORY LEAK: Unhandled error in timed loop.\n%s",
tb,
)
from twisted.internet import reactor as _reactor
_reactor.stop()

Loading…
Cancel
Save

Powered by TurnKey Linux.