From 4b9dcf377c4b8abc81afb10fdde9b0d918068000 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 7 Oct 2015 00:18:40 +0100 Subject: [PATCH] [Core] Fix Twisted AlreadyCalled error on shutdown --- deluge/core/alertmanager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/core/alertmanager.py b/deluge/core/alertmanager.py index 6f6f40371..7c65abfff 100644 --- a/deluge/core/alertmanager.py +++ b/deluge/core/alertmanager.py @@ -74,7 +74,8 @@ class AlertManager(component.Component): def stop(self): for dc in self.delayed_calls: - dc.cancel() + if dc.active(): + dc.cancel() self.delayed_calls = [] def register_handler(self, alert_type, handler):