From 979d540a6361c43d884ac5fd93e6b1bf430eab01 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Wed, 9 Jul 2008 12:49:11 +0000 Subject: [PATCH] Have the client disconnect from the daemon if a socket error or xmlrpclib protocol error is encountered. --- deluge/ui/client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deluge/ui/client.py b/deluge/ui/client.py index c35a519cb..d8f4399fe 100644 --- a/deluge/ui/client.py +++ b/deluge/ui/client.py @@ -95,11 +95,12 @@ class CoreProxy(gobject.GObject): callback(ret) except: pass - except (socket.error, xmlrpclib.ProtocolError, - deluge.xmlrpclib.Fault, Exception), e: - log.warning("Multi-call Exception: %s:%s", e, getattr(e,"message",None)) + except (socket.error, xmlrpclib.ProtocolError), e: + self.set_core_uri(None) + except (deluge.xmlrpclib.Fault, Exception), e: #self.set_core_uri(None) , disabled : there are many reasons for an exception ; not just an invalid core. #todo : publish an exception event, ui's like gtk could popup a dialog for this. + log.warning("Multi-call Exception: %s:%s", e, getattr(e,"message",None)) finally: self._callbacks = []