summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 125d4993..c3332c87 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -760,14 +760,11 @@ class XMLStream(object):
self.whitespace_keepalive_interval = 300
"""
-
- def send_keepalive():
- if self.send_queue.empty():
- self.send_raw(' ')
-
self.schedule('Whitespace Keepalive',
self.whitespace_keepalive_interval,
- send_keepalive,
+ self.send_raw,
+ args = (' ',),
+ kwargs = {'now': True},
repeat=True)
def _end_keepalive(self, event):