Closed bhoehl closed 2 years ago
Thanks for the report. There is definitely something wrong here.
Figured it out. I'll get a patch out this weekend. The issue is that we do not send a CloseOk back when the channel is forcefully closed, so the second channel is still waiting for that message, causing it to get into a weird state.
When declaring a queue, which is not yet declared, using passive=True, an error is raised and the channel ought to be closed. The code behaves as if so, but continuing using channels is causing an error on the server:
What can also be observed, is that the RabbitMQ server ( 3.7.8) is listing the channel after this error as open in the admin web UI. The error can easily be reproduced by establishing a RabbitMQ connection and using this code snippet:
There is no chance of handling this, except closing the whole connection. I would consider this a bug. Please check, if you can reproduce. Btw. it does not matter if you add channel.close() or use with in between. Even the latest RabbitMQ version 3.9.9 behaves the same.