Index: deluge/ui/gtkui/signals.py =================================================================== --- deluge/ui/gtkui/signals.py (revision 2020) +++ deluge/ui/gtkui/signals.py (working copy) @@ -50,6 +50,10 @@ self.receiver.connect_to_signal("torrent_all_resumed", self.torrent_all_resumed) + def __del__(self): + self.receiver.stop() + del self.receiver + def torrent_added_signal(self, torrent_id): log.debug("torrent_added signal received..") log.debug("torrent id: %s", torrent_id) Index: deluge/ui/signalreceiver.py =================================================================== --- deluge/ui/signalreceiver.py (revision 2020) +++ deluge/ui/signalreceiver.py (working copy) @@ -68,6 +68,9 @@ # FIXME: send actual URI not localhost core = xmlrpclib.ServerProxy(core_uri) core.register_client("http://localhost:" + str(port)) + + def __del__(self): + self.unregister_function(self.emit_signal) def run(self): """This gets called when we start the thread""" Index: deluge/SimpleXMLRPCServer.py =================================================================== --- deluge/SimpleXMLRPCServer.py (revision 2020) +++ deluge/SimpleXMLRPCServer.py (working copy) @@ -216,6 +216,11 @@ name = function.__name__ self.funcs[name] = function + def unregister_function(self, function): + for name in self.funcs: + if function in self.funcs[name]: + self.funcs[name].remove(function) + def register_introspection_functions(self): """Registers the XML-RPC introspection methods in the system namespace.