Better handle pika connection errors
It seems like pika may raise AttributeError when the connection is closed, as describe here: https://github.com/pika/pika/issues/638, resulting in this error displayed on the webclient: 500: POST /storyboard_api/tasks: 'NoneType' object has no attribute 'send' This change adds AttributeError to the ConnectionClosed except. Change-Id: Iffa1ef1998379097b32d699a360b5de9277c01ed
This commit is contained in:
parent
197fdd795f
commit
ca537c255a
@ -103,7 +103,7 @@ class Publisher(ConnectionService):
|
||||
if payload in self._pending:
|
||||
self._pending.remove(payload)
|
||||
return True
|
||||
except ConnectionClosed as cc:
|
||||
except (ConnectionClosed, AttributeError) as cc:
|
||||
LOG.warning(_LW("Attempted to send message on closed connection."))
|
||||
LOG.debug(cc)
|
||||
self._open = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user