pika/pika — pull request #358 by eandersson (2013-06-06 12:13:15+00:00)
Title: Fix for Issue #356.

There is probably a better approach to fixing this, maybe using self.is_closed instead of self.socket.

Another approach would be to make sure that the socket is not nullified before reaching the close function.