mirror of
https://github.com/zulip/zulip.git
synced 2025-10-30 03:23:50 +00:00
queue: Only NAK the events if the channel is still open.
If the exception was because the channel closed, attempting to NAK the events will just raise another error, and is pointless, as the server already marked the pending events as NAK'd.
This commit is contained in:
committed by
Tim Abbott
parent
55b26da82b
commit
2b37a35f71
@@ -217,7 +217,8 @@ class SimpleQueueClient(QueueClient[BlockingChannel]):
|
||||
callback(events)
|
||||
channel.basic_ack(max_processed, multiple=True)
|
||||
except BaseException:
|
||||
channel.basic_nack(max_processed, multiple=True)
|
||||
if channel.is_open:
|
||||
channel.basic_nack(max_processed, multiple=True)
|
||||
raise
|
||||
events = []
|
||||
last_process = now
|
||||
|
||||
Reference in New Issue
Block a user