videlalvaro/php-amqplib — pull request #83 by ehberg (2013-06-06 22:28:50+00:00)
Title: Check for valid socket resource before closing the AMQP connection

During the course of development, I ran into a situation where my code was trying to close the AMQPConnection multiple times. Besides this being poorly coded on my end, I thought it would be useful to check for a valid socket before trying to close the AMQP connection to RabbitMQ.