public void DestroySocket([NotNull] SocketBase socket)
{
// Free the associated thread slot.
lock (m_slotSync)
{
int threadId = socket.ThreadId;
m_emptySlots.Push(threadId);
m_slots[threadId].Close();
m_slots[threadId] = null;
// Remove the socket from the list of sockets.
m_sockets.Remove(socket);
// If zmq_term() was already called and there are no more socket
// we can ask reaper thread to terminate.
if (m_terminating && m_sockets.Count == 0)
m_reaper.Stop();
}
//LOG.debug("Released Slot [" + socket_ + "] ");
}