pika/pika — pull request #230 by adamaflynn (2012-12-09 21:07:12+00:00)
Title: Fix closing connection while a channel is still open

Not sure if this is the way you want to fix this, but I was running into an issue where if you shut down RabbitMQ while pika has an open channel, it would try to send Channel.Close over a closed socket which would trigger another _on_close call that would send another Channel.Close and it'd get stuck in a recursive loop.