aioamqp
aioamqp copied to clipboard
protocol on_error called twice for the same issue
Steps to reproduce on aioamqp 0.8.2:
- Just kill rabbitmq and you'll see that the error callback is called twice
Did not investigated it but, this happens because _close_channels in protocol.py is called on connection lost and on AmqpClosedConncetion exception.
Desired behavior: on connection error I would expect my callback to be called once to be able to handle reconnection properly.
This will be dealt with as part of the API redesign of #118. This callback (like most/all others) is most likely going to be removed altogether.