mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-23 19:19:53 +00:00
remove ping schedule on disconnect
This commit is contained in:
parent
24a14a0284
commit
20cacc84ba
1 changed files with 5 additions and 0 deletions
|
@ -70,6 +70,8 @@ class xep_0199(base_plugin):
|
|||
self.xmpp.add_event_handler('session_start',
|
||||
self._handle_keepalive,
|
||||
threaded=True)
|
||||
self.xmpp.add_event_handler('session_end',
|
||||
self._handle_session_end)
|
||||
|
||||
def post_init(self):
|
||||
"""Handle cross-plugin dependencies."""
|
||||
|
@ -106,6 +108,9 @@ class xep_0199(base_plugin):
|
|||
scheduled_ping,
|
||||
repeat=True)
|
||||
|
||||
def _handle_session_end(self, event):
|
||||
self.xmpp.scheduler.remove('Ping Keep Alive')
|
||||
|
||||
def _handle_ping(self, iq):
|
||||
"""
|
||||
Automatically reply to ping requests.
|
||||
|
|
Loading…
Reference in a new issue