Azure / azure-uamqp-python

AMQP 1.0 client library for Python
MIT License
56 stars 48 forks source link

Infinite loop in async sending #291

Closed yunhaoling closed 2 years ago

yunhaoling commented 2 years ago

In edge cases (e.g., race condition), async send would fail into infinite loop. This happens when self.do_work_async() is always returning False (e.g, self._shutdown is True):

https://github.com/Azure/azure-uamqp-python/blob/db2031465ee3325ca3493f9aeb137dc187bdb037/uamqp/async_ops/client_async.py#L637-L638

This is a bug and we should fix it -- duplicate what we're doing in the sync implementation.