Azure / azure-uamqp-python

AMQP 1.0 client library for Python
MIT License
57 stars 47 forks source link

Improve idle timeout connection status transition #151

Closed yunhaoling closed 2 years ago

yunhaoling commented 4 years ago

When connection idle timeout happens, the underlying C code would set the connection status to DISCARDING.

In previous implementation, the connection status would go through weird transition in the case of idle timeout:

OPENED->DISCARDING DISCARDING->DISCARDING DISCARDING->DISCARDING ... DISCARDING->DISCARDING DISCARDING->END END->DISCARDING # This is the most weird part Although the functionality is not affected, but the improper status transition is annoying. This can be improved in state_changed of connection.py to handle the case of DISCARDING.

https://github.com/Azure/azure-uamqp-python/pull/131