irclib: catch exception when calling callback.reset()

We don't want the Irc driver to hang when a plugin crashes
in this function.
This commit is contained in:
Valentin Lorentz 2020-05-17 12:46:01 +02:00
parent 2fe9bedb86
commit e9a8826805

View File

@ -1208,7 +1208,10 @@ class Irc(IrcCommandDispatcher, log.Firewalled):
self.fastqueue.reset()
self.startedSync.clear()
for callback in self.callbacks:
try:
callback.reset()
except Exception:
log.exception('Uncaught exception in %r.reset()', callback)
self._queueConnectMessages()
def _setNonResettingVariables(self):