improved network handling

This commit is contained in:
Steve Waterworth
2019-04-24 14:38:31 +01:00
parent a6897c2791
commit 3776c79a07

View File

@@ -38,7 +38,7 @@ class Publisher:
self._connect()
try:
self._publish(msg, headers)
except pika.exceptions.ConnectionClosed:
except (pika.exceptions.ConnectionClosed, pika.exceptions.StreamLostError):
self._logger.info('reconnecting to queue')
self._connect()
self._publish(msg, headers)