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
This commit is contained in:
parent
bf7ca2aa53
commit
8bfc3637a2
@ -983,7 +983,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
Block a user