phpinnacle / ridge

Pure asynchronous PHP implementation of the AMQP 0-9-1 protocol.
MIT License
50 stars 13 forks source link

There is no way to react on canceled connection #25

Closed Volonda closed 2 years ago

Volonda commented 3 years ago

if PHPinnacle\Ridge\Client receive PHPinnacle\Ridge\Protocol\ConnectionCloseFrame it will never chnage state to STATE_NOT_CONNECTED. There is no way to detect/subscribe on canceled connection from user code.

Maybe neccesary to change state here? https://github.com/phpinnacle/ridge/blob/b362ee698d0c1441c777d3496deff3bd614bf1c3/src/Client.php#L130

mmasiukevich commented 2 years ago

This is not really a solution to the problem. The problem is that the adapter only subscribes to successful frames. I will think about how to fix it in the future.