zeromq/pyzmq — pull request #540 by minrk (2014-05-01 23:06:29+00:00)
Title: don't close sockets in a callback

Closing a stream after IOLoop has stopped results in the socket never being closed.

If you want to schedule socket closure, use add_callback(stream.close)