Polyconseil / aioamqp

AMQP implementation using asyncio
Other
280 stars 88 forks source link

Send channel-close-ok in response to server channel-close messages #69

Closed foolswood closed 8 years ago

foolswood commented 8 years ago

This helps around channel reuse in the case of a server initiated close. For instance trying to consume from a non-existent queue. The current handler returns the channel_id to the pool without sending the channel_close_ok. The channel cannot be used (at least with rabbitmq) as the broker is waiting for that response.

dzen commented 8 years ago

Hello,

thank you for bringing us this case. I'll take a look tomorow

foolswood commented 8 years ago

Anything I can do to help on this?

dzen commented 8 years ago

I just need a few times to test it :)

foolswood commented 8 years ago

In my local testing the test I've added fails on master and passes in this branch, hopefully that'll save you some time.

foolswood commented 8 years ago

Is there anything specific you wanted tested?

foolswood commented 8 years ago

We have been running our production system from this branch for a week now, haven't seen any issues with it.

dzen commented 8 years ago

Thanks for your tests and for your periodic notifications !

Do you mind if I ask you to squash your commits and set the commit message like:

channel: send channel-close-ok in response to channel-close ?

foolswood commented 8 years ago

@leth just opening is sufficient. What I wrote does not work on master, but not via a hang, the broker rejects the second channel open request.

foolswood commented 8 years ago

@dzen Are you wanting me to refactor Protocol.channel?

foolswood commented 8 years ago

Rebased

dzen commented 8 years ago

Thank you @foolswood I cherry pick'd your commit and just pushed it to master.