From f8eb9476f386bb85936ad1549b232dbedefb202e Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 18 Mar 2012 15:40:03 +0000 Subject: [PATCH] connection.py: Use XEP-0198 ack request as ping/pong when available. Fixes #7090 --- src/common/connection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/connection.py b/src/common/connection.py index 418c1694e..ff8556417 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -1616,7 +1616,8 @@ class Connection(CommonConnection, ConnectionHandlers): if not gajim.account_is_connected(self.name): return self.connection.set_send_timeout(self.keepalives, self.send_keepalive) - self.connection.set_send_timeout2(self.pingalives, self.sendPing) + self.connection.set_send_timeout2(self.pingalives, + self.sm.enabled and self.sm.request_ack or self.sendPing) self.connection.onreceive(None) self.privacy_rules_requested = False