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

Crash when the logger is set to debug mode #447

Closed haudren-woven closed 2 years ago

haudren-woven commented 2 years ago

First of all, thanks for the library!

I was playing with it and trying to work with properly deleting my queues / channels / connections when cancelling some tasks. I enabled the debug logger, and noticed that the event loop would stop, due to an exception. I traced it to those three locations, within queue.py:

This means that at that point, the class has no more _consumer_tag member, and all attempts to print it will fail. I can see two ways to fix it, but I'd like your opinion:

process0 commented 2 years ago

Can confirm.

mosquito commented 2 years ago

@haudren-woven thank you so much for such a detailed analysis of the problem. Keep up the good work.

cdbennett commented 2 years ago

Thanks for releasing the fix for this!