Small fix.

This commit is contained in:
Louis Vézina 2019-12-18 07:05:25 -05:00
parent 43b9a8d0fe
commit d76b821814
1 changed files with 4 additions and 2 deletions

View File

@ -26,8 +26,10 @@ class EventStream:
:rtype: str
"""
if self.queue or (len(self.queue) > 0):
return self.queue.popleft()
while True:
if self.queue or (len(self.queue) > 0):
yield self.queue.popleft()
time.sleep(0.1)
event_stream = EventStream()