Catch socket.timeout when doing heartbeat_check
heartbeat_check in kombu.connection is not reraising exceptions as
exceptions.OperationalError, and the socket timeout during the heartbeat
check is really an issue seen in the field when a node goes down; the
heartbeat thread just tries again and again to deal with it, without
success.
Change-Id: I26dbdb18a7e64946db2cba676764ff2d428c7897
Closes-Bug: #1657444
(cherry picked from commit 8bfc3637a2
)
This commit is contained in:
parent
a07d852b23
commit
ae3de7f37c
|
@ -988,7 +988,8 @@ class Connection(object):
|
|||
self.connection.drain_events(timeout=0.001)
|
||||
except socket.timeout:
|
||||
pass
|
||||
except kombu.exceptions.OperationalError as exc:
|
||||
except (socket.timeout,
|
||||
kombu.exceptions.OperationalError) as exc:
|
||||
LOG.info(_LI("A recoverable connection/channel error "
|
||||
"occurred, trying to reconnect: %s"), exc)
|
||||
self.ensure_connection()
|
||||
|
|
Loading…
Reference in New Issue