diff --git a/TODO b/TODO index 17a054f7f..6d8dc210c 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,3 @@ -* Have the ui better handle not being able to connect to the daemon. * Add state saving to listview.. this includes saving column size and position. * Queue plugin 'apply_queue' stuff.. Just finishing the queue plugin and it's intended functionality. diff --git a/deluge/core/alertmanager.py b/deluge/core/alertmanager.py index d86f8db11..4df546005 100644 --- a/deluge/core/alertmanager.py +++ b/deluge/core/alertmanager.py @@ -84,7 +84,7 @@ class AlertManager: # Call any handlers for this alert type if alert_type in self.handlers.keys(): for handler in self.handlers[alert_type]: - handler(alert) + gobject.idle_add(handler, alert) alert = self.session.pop_alert() diff --git a/deluge/ui/signalreceiver.py b/deluge/ui/signalreceiver.py index 60f880830..a5435e20c 100644 --- a/deluge/ui/signalreceiver.py +++ b/deluge/ui/signalreceiver.py @@ -82,8 +82,11 @@ class SignalReceiver( """Shutdowns receiver thread""" self._shutdown = True # De-register with the daemon so it doesn't try to send us more signals - client.get_core().deregister_client( - "http://localhost:" + str(self.port)) + try: + client.get_core().deregister_client( + "http://localhost:" + str(self.port)) + except (socket.error, AttributeError): + pass # Hacky.. sends a request to our local receiver to ensure that it # shutdowns.. This is because handle_request() is a blocking call.