Skip to content

Commit

Permalink
Merge pull request #88 from peter-wimsey/errors-when-reconnecting
Browse files Browse the repository at this point in the history
Do not attempt to reconnect channels if there is no connection
  • Loading branch information
mosquito committed Jan 3, 2018
2 parents f9a6825 + 4f1c820 commit 525bc3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aio_pika/robust_connection.py
Expand Up @@ -94,10 +94,10 @@ def _on_connection_lost(self, future: asyncio.Future, connection: AsyncioConnect
def connect(self):
result = yield from super().connect()

for number, channel in self._channels.items():
yield from channel.on_reconnect(self, number)

if self._connection:
for number, channel in self._channels.items():
yield from channel.on_reconnect(self, number)

for callback in self._on_reconnect_callbacks:
callback(self)

Expand Down

0 comments on commit 525bc3d

Please sign in to comment.