diff --git a/aio_pika/connection.py b/aio_pika/connection.py index 0a59b618..cafaf2d0 100644 --- a/aio_pika/connection.py +++ b/aio_pika/connection.py @@ -104,7 +104,7 @@ def _on_connection_close(self, connection, closing, *args, **kwargs): async def _make_connection(self, **kwargs) -> aiormq.Connection: connection = await aiormq.connect(self.url, **kwargs) connection.closing.add_done_callback( - partial(self._on_connection_close, self.connection), + partial(self._on_connection_close, connection), ) return connection