From 54645ae409833339979a66d707ea87a7dad6603a Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 16 Aug 2005 16:10:36 +0000 Subject: [PATCH] temporary fix for the Event dispatcher to work with TLS connections --- src/common/connection.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index 9c594c476..cf3f1d6ae 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -1159,7 +1159,7 @@ class Connection: self.last_incoming = time.time() self.keep_alive_sent = False - def _event_dispatcher(self, realm, event, data): + def _event_dispatcher(self, realm, event, data): if realm == common.xmpp.NS_REGISTER: if event == common.xmpp.features.REGISTER_DATA_RECEIVED: # data is (agent, DataFrom) @@ -1299,7 +1299,8 @@ class Connection: self.dispatch('STATUS', 'offline') self.dispatch('ERROR', (_('Could not connect to "%s"') % self.name, _('Check your connection or try again later'))) - return None + return None + con.RegisterEventHandler(self._event_dispatcher) if auth: con.initRoster() self.last_incoming = time.time()