summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-07-30 17:17:50 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-07-30 17:35:21 +0200
commita404195a0a57030017067573aba1de2570f0280c (patch)
tree3eb9d554f93f631aaf5dce1eb7397de0d1542cc8 /src/core
parentfe16d52b7b2c2172e38d0f7f57dd605a230a89a0 (diff)
downloadpoezio-a404195a0a57030017067573aba1de2570f0280c.tar.gz
poezio-a404195a0a57030017067573aba1de2570f0280c.tar.bz2
poezio-a404195a0a57030017067573aba1de2570f0280c.tar.xz
poezio-a404195a0a57030017067573aba1de2570f0280c.zip
Send pings only when we are connected
Diffstat (limited to 'src/core')
-rw-r--r--src/core/handlers.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/handlers.py b/src/core/handlers.py
index 654ce376..92533d63 100644
--- a/src/core/handlers.py
+++ b/src/core/handlers.py
@@ -822,6 +822,8 @@ def on_disconnected(self, event):
"""
When we are disconnected from remote server
"""
+ # Stop the ping plugin. It would try to send stanza on regular basis
+ self.xmpp.plugin['xep_0199'].disable_keepalive()
roster.modified()
for tab in self.get_tabs(tabs.MucTab):
tab.disconnect()
@@ -892,6 +894,8 @@ def on_session_start(self, event):
if config.get('enable_user_nick', True):
self.xmpp.plugin['xep_0172'].publish_nick(nick=self.own_nick, callback=dumb_callback)
self.xmpp.plugin['xep_0115'].update_caps()
+ # Start the ping's plugin regular event
+ self.xmpp.set_keepalive_values()
### Other handlers ###