From bb424fecf13ffb65f465a0c9e9ba99074d97bc04 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Wed, 18 May 2005 13:42:12 +0000 Subject: [PATCH] put xmpp.Process() in a try/except (see ticket #291) --- src/common/connection.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/common/connection.py b/src/common/connection.py index 5b72b0d7f0..05a209b038 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -946,5 +946,15 @@ class Connection: if not self.connection: return if self.connected: - self.connection.Process(timeout) + try: + self.connection.Process(timeout) + except e, msg: + gajim.log.debug('error appeared while processing xmpp: %s' % msg) + self.connected = 0 + self.dispatch('STATUS', 'offline') + try: + self.connection.disconnect() + except: + gajim.log.debug('error appeared while processing xmpp: %s' % msg) + self.connection = None # END GajimCore -- GitLab