Change. All sockets close when context destroying.
Change. ctx:socket_count method exists in release version.
You can remove this behavior defining LZMQ_SOCKET_COUNT=0 LZMQ_AUTOCLOSE_SOCKET=0 at compile time.