diff options
author | Robin Gloster <robin@loc-com.de> | 2014-08-17 23:37:19 +0200 |
---|---|---|
committer | Robin Gloster <robin@loc-com.de> | 2014-08-17 23:38:07 +0200 |
commit | d61f1cd035fa661588909ea0fdc4b62cc8a90161 (patch) | |
tree | 0d82b48c7997dee870d8c7c017808ff1ca03f3ab | |
parent | a5c03b763a6545a214f4f391f7c07582c22150b2 (diff) | |
download | slixmpp-d61f1cd035fa661588909ea0fdc4b62cc8a90161.tar.gz slixmpp-d61f1cd035fa661588909ea0fdc4b62cc8a90161.tar.bz2 slixmpp-d61f1cd035fa661588909ea0fdc4b62cc8a90161.tar.xz slixmpp-d61f1cd035fa661588909ea0fdc4b62cc8a90161.zip |
only schedule whitespace keepalive if enabled
-rw-r--r-- | sleekxmpp/xmlstream/xmlstream.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 66985f3d..e011cf3d 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -938,12 +938,13 @@ class XMLStream(object): self.whitespace_keepalive_interval = 300 """ - self.schedule('Whitespace Keepalive', - self.whitespace_keepalive_interval, - self.send_raw, - args=(' ',), - kwargs={'now': True}, - repeat=True) + if self.whitespace_keepalive: + self.schedule('Whitespace Keepalive', + self.whitespace_keepalive_interval, + self.send_raw, + args=(' ',), + kwargs={'now': True}, + repeat=True) def _remove_schedules(self, event): """Remove whitespace keepalive and certificate expiration schedules.""" |