Polyconseil / aioamqp

AMQP implementation using asyncio
Other
280 stars 88 forks source link

Drop channel instance after channel is closed #68

Closed leth closed 8 years ago

leth commented 8 years ago

This means we avoid calling 'channel.connection_closed' on already closed channels.

leth commented 8 years ago

Ah this trips up the tests, it would be good to get some feedback on this change if it's changing behavior :)

dzen commented 8 years ago

Hello,

Since the channel is normaly created from the protocol, I think the protocol class should keep the control of its deletion ?

leth commented 8 years ago

That's what my change does. Currently closed channels are never deleted, they are only deleted when the channel ID is re-used and they are overwritten.

leth commented 8 years ago

Also I think currently, a channel's connection_close callback will be called twice, once when the channel closes, and another time when the protocol closes. However if the channel ID was reused, it will only be called the first time.

leth commented 8 years ago

Closing in favor of #88