From 5aa3bfd16d0cae38197f2f1dbf40b03883de9001 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 22 Feb 2008 09:10:59 +0000 Subject: [PATCH] Fix stopping signalreceiver --- deluge/ui/signalreceiver.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/deluge/ui/signalreceiver.py b/deluge/ui/signalreceiver.py index 7e89c0b45..ce053efc2 100644 --- a/deluge/ui/signalreceiver.py +++ b/deluge/ui/signalreceiver.py @@ -70,9 +70,13 @@ class SignalReceiver( """Shutdowns receiver thread""" self._shutdown = True # De-register with the daemon so it doesn't try to send us more signals - client.deregister_client() - client.force_call() - + try: + client.deregister_client() + client.force_call() + except: + pass + log.debug("Shutting down signalreceiver") + # Hacky.. sends a request to our local receiver to ensure that it # shutdowns.. This is because handle_request() is a blocking call. receiver = xmlrpclib.ServerProxy("http://localhost:" + str(self.port),