Permalink
Browse files

Bug 951558: reconnect on IOError, too; r=jhopkins

  • Loading branch information...
djmitche committed Dec 20, 2013
1 parent 584feeb commit 4e9eb730016ef58d085b53ee7f99028d5b4a1e44
Showing with 3 additions and 3 deletions.
  1. +3 −3 buildapi/lib/mq.py
View
@@ -103,13 +103,13 @@ def wait(self, limit=None):
sleep_time = 1
consumer.register_callback(self.receive)
consumer.wait(limit)
- except self.connection.ConnectionException:
- log.info("Lost connection, trying again in %is", sleep_time)
+ except (self.connection.ConnectionException, IOError):
+ log.info("Lost connection, trying again in %is", sleep_time, exc_info=True)
self.disconnect()
time.sleep(sleep_time)
sleep_time = min(sleep_time*2, 60)
except socket.error:
- log.info("Connection refused, trying again in %is", sleep_time)
+ log.info("Connection refused, trying again in %is", sleep_time, exc_info=True)
self.disconnect()
time.sleep(sleep_time)
sleep_time = min(sleep_time*2, 60)

0 comments on commit 4e9eb73

Please sign in to comment.