mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
events: Fix incorrectly empty event queues with virtual events.
I'm not sure this had much impact, but it's definitely a subtle bug. (imported from commit 0260d4c5c35ce8eac683e84f1d939a6704ce4e2b)
This commit is contained in:
@@ -198,7 +198,7 @@ class EventQueue(object):
|
||||
return self.queue.popleft()
|
||||
|
||||
def empty(self):
|
||||
return len(self.queue) == 0
|
||||
return len(self.queue) == 0 and len(self.virtual_events) == 0
|
||||
|
||||
def prune(self, through_id):
|
||||
while not self.empty() and self.queue[0]['id'] <= through_id:
|
||||
|
||||
Reference in New Issue
Block a user