[rabbitmq-discuss] How to close connection and channel when an exception occur

Emile Joubert emile at rabbitmq.com
Fri Sep 27 14:38:20 BST 2013


On 27/09/13 14:31, Phil wrote:
> "channel.close() or conn.close()" in the catch  or finally
> block.  

You probably declared the channel and conn variables in the scope of the
"try" block. Try declaring them before the "try" block.



-Emile


More information about the rabbitmq-discuss mailing list