zeromq/czmq — pull request #525 by hintjens (2014-06-15 12:53:36+00:00)
Title: Problem: zsys deadlocked at exit, if ZSOCK_NOCHECK was defined

The code in zsys_close was wrong; it did not close sockets when the
macro was defined (due to sockets not being tracked). This led to a
shutdown deadlock in libzmq (due to 1 or more sockets remaining open).

Solution: when ZSOCK_NOCHECK is defined, do not attempt to use list
of tracked sockets in zsys_close. Always close socket. Second, if there
are sockets remaining open, log an error but don't call zmq_term().