Merge branch 'master' into develop

This commit is contained in:
Lance Stout 2012-10-02 09:51:24 -07:00
commit 84a2fc382b
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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.