summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-06-13 09:13:33 -0700
committerLance Stout <lancestout@gmail.com>2012-06-13 09:13:33 -0700
commitc39ad7dfbb862d22994329963df8c4729c083305 (patch)
tree29ee3abfd3a60af65402774d11504ae86b02513f
parentb92ae706e98e94dbc329a099a0a9e10b21a379e7 (diff)
downloadslixmpp-c39ad7dfbb862d22994329963df8c4729c083305.tar.gz
slixmpp-c39ad7dfbb862d22994329963df8c4729c083305.tar.bz2
slixmpp-c39ad7dfbb862d22994329963df8c4729c083305.tar.xz
slixmpp-c39ad7dfbb862d22994329963df8c4729c083305.zip
Prevent duplicate certificate expiration timers.
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 6dfd5498..c0d02e9b 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -317,7 +317,7 @@ class XMLStream(object):
self.dns_service = None
self.add_event_handler('connected', self._handle_connected)
- self.add_event_handler('disconnected', self._end_keepalive)
+ 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)
@@ -878,9 +878,10 @@ class XMLStream(object):
kwargs = {'now': True},
repeat=True)
- def _end_keepalive(self, event):
- """Stop sending whitespace keepalives"""
+ def _remove_schedules(self, event):
+ """Remove whitespace keepalive and certificate expiration schedules."""
self.scheduler.remove('Whitespace Keepalive')
+ self.scheduler.remove('Certificate Expiration')
def start_stream_handler(self, xml):
"""Perform any initialization actions, such as handshakes,