summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-10-02 09:25:30 -0700
committerLance Stout <lancestout@gmail.com>2012-10-02 09:25:30 -0700
commit098714b3c40af20b09cafee4bb09c0fa64c6cb00 (patch)
tree0cfad9f1b8165c009b1739541eff48e6b3c1a6f5 /sleekxmpp
parent94488fa2ea4dac7ff6fce20621d2e80e700f6299 (diff)
downloadslixmpp-098714b3c40af20b09cafee4bb09c0fa64c6cb00.tar.gz
slixmpp-098714b3c40af20b09cafee4bb09c0fa64c6cb00.tar.bz2
slixmpp-098714b3c40af20b09cafee4bb09c0fa64c6cb00.tar.xz
slixmpp-098714b3c40af20b09cafee4bb09c0fa64c6cb00.zip
Unclobber connected event handler names.
Fixes issue #199
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/clientxmpp.py4
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py
index 9aa64256..7577b7da 100644
--- a/sleekxmpp/clientxmpp.py
+++ b/sleekxmpp/clientxmpp.py
@@ -95,7 +95,7 @@ class ClientXMPP(BaseXMPP):
self.bound = False
self.bindfail = False
- self.add_event_handler('connected', self._handle_connected)
+ self.add_event_handler('connected', self._reset_connection_state)
self.add_event_handler('session_bind', self._handle_session_bind)
self.register_stanza(StreamFeatures)
@@ -253,7 +253,7 @@ class ClientXMPP(BaseXMPP):
self._handle_roster(response)
return response
- def _handle_connected(self, event=None):
+ def _reset_connection_state(self, event=None):
#TODO: Use stream state here
self.authenticated = False
self.sessionstarted = False
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index dff32461..4cc1ac21 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -335,7 +335,7 @@ class XMLStream(object):
#: ``_xmpp-client._tcp`` service.
self.dns_service = None
- self.add_event_handler('connected', self._handle_connected)
+ self.add_event_handler('connected', self._session_timeout_check)
self.add_event_handler('disconnected', self._remove_schedules)
self.add_event_handler('session_start', self._start_keepalive)
self.add_event_handler('session_start', self._cert_expiration)
@@ -630,7 +630,7 @@ class XMLStream(object):
serr.errno, serr.strerror)
return False
- def _handle_connected(self, event=None):
+ def _session_timeout_check(self, event=None):
"""
Add check to ensure that a session is established within
a reasonable amount of time.