OK, after investigating, it looks like I get the exception on channel_close() because the channel was already closed, due to the send error. The exception is raised with the last error message.
This is rather surprising from a user point of view : my basic_publish() actually fails but the deferred's callback is called, and the channel is silently closed. I think it would be more logical to get and errback on the basic_publish deferred.
OK, after investigating, it looks like I get the exception on channel_close() because the channel was already closed, due to the send error. The exception is raised with the last error message.
This is rather surprising from a user point of view : my basic_publish() actually fails but the deferred's callback is called, and the channel is silently closed. I think it would be more logical to get and errback on the basic_publish deferred.
Or am I doing something wrong here ?