Pika fails to check if blocking connection is open because channel is None

18 views
Skip to first unread message

Jiří Bajer

unread,
Aug 21, 2023, 11:01:14 AM8/21/23
to Pika
My application uses Pika's `BlockingConnection` and when the application is shutting down, it calls `close()` on this connection. I noticed that sometimes Pika fails to close the connection because the channel is `None`:
```
AttributeError 'NoneType' object has no attribute 'is_open'
```
The exception is raised by pika.adapters.blocking_connection.py:807 when trying to close channels that remain opened.

It doesn't happen always, so I don't have reliable reproduction steps.

Is this a bug suitable for logging to Pika's GitHub issues?

pika 1.3.2, CPython 3.10, Ubuntu LTS, Kubernetes pod in AWS.

Luke Bakken

unread,
Aug 22, 2023, 8:54:30 AM8/22/23
to Pika
Hello,

Thanks for using Pika and noticing this behavior. Feel free to open an issue here - https://github.com/pika/pika/issues

Luke

Reply all
Reply to author
Forward
0 new messages