From b566c0f2012700df6c1bdb61c11f622b7ac833ad Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Tue, 10 Dec 2013 17:40:30 -0500 Subject: [PATCH] Catch a wider range of exceptions when adding events to event queues We have observed additional exceptions being thrown from zulip_finish and we need to make sure that the handler is disconnected from the queue, or else the event queue will keep throwing exceptions due to the handler being closed. (imported from commit 59273aa14495216430b9eb1525b2cce230d8913d) --- zerver/lib/event_queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/lib/event_queue.py b/zerver/lib/event_queue.py index 2f563fe050..248dd4c83b 100644 --- a/zerver/lib/event_queue.py +++ b/zerver/lib/event_queue.py @@ -99,7 +99,7 @@ class ClientDescriptor(object): queue_id=self.event_queue.id), self.current_handler._request, apply_markdown=self.apply_markdown) - except socket.error: + except Exception: logging.exception("Got error adding event to queue %s" % (self.event_queue.id)) self.disconnect_handler()