Merge "Catch socket.timeout when doing heartbeat_check"

This commit is contained in:
Zuul 2017-11-17 10:33:23 +00:00 committed by Gerrit Code Review
commit c198b345a3

View File

@ -983,7 +983,8 @@ class Connection(object):
self.connection.drain_events(timeout=0.001) self.connection.drain_events(timeout=0.001)
except socket.timeout: except socket.timeout:
pass pass
except kombu.exceptions.OperationalError as exc: except (socket.timeout,
kombu.exceptions.OperationalError) as exc:
LOG.info(_LI("A recoverable connection/channel error " LOG.info(_LI("A recoverable connection/channel error "
"occurred, trying to reconnect: %s"), exc) "occurred, trying to reconnect: %s"), exc)
self.ensure_connection() self.ensure_connection()