Simplify sending whitespace keepalives.

Now that we have the send lock, we can use now=True.
This commit is contained in:
Lance Stout 2012-03-27 20:53:27 -07:00
parent 9879c7af59
commit ee6a9b981a

View File

@ -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):