Simplify sending whitespace keepalives.
Now that we have the send lock, we can use now=True.
This commit is contained in:
parent
9879c7af59
commit
ee6a9b981a
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user