mosquito / aio-pika

AMQP 0.9 client designed for asyncio and humans.
https://aio-pika.readthedocs.org/
Apache License 2.0
1.18k stars 186 forks source link

Fix memory leaks #496

Closed przemyslawfierek-silvair closed 1 year ago

przemyslawfierek-silvair commented 1 year ago

I've found two places that keep references to the Channel object methods and that prevents Garbage Collecter from deleting the channel from the memory. As result, after restoring the connection the RobustConnection restores all already closed channels.

The issue reproduction steps:

  1. Start locally RabbitMQ broker instance
  2. Create RobustConnection to the broker and open some RobustChannel
  3. Check in a panel (i.e. RabbitMQ management) that the channel is opened
  4. Close the channel
  5. Restart broker
  6. Check that you already opened 2 channels
przemyslawfierek-silvair commented 1 year ago

I'm working on fix

mosquito commented 1 year ago

Released in 8.2.4