saltstack/salt — pull request #3863 by zsimic (2013-02-27 10:12:39+00:00)
Title: Unregister socket from poller in SREQ.send()

Ran into trouble with SREQ.send() while using ~100 threads submitting each one salt request to a peer-publishing minion. SREQ.send() would often hang the entire process, after investigation, it turned out that the likely culprit was SREQ.send(). The fix here (+ an upgrade of pyzmq) solved the problem.

I'm submitting this on the 0.13 branch, but I didn't get a chance to test this with 0.13 yet. I've seen the above described bug in 0.10.3. Can't upgrade yet, but will do as soon as possible.

This is basically simply unregistering the socket from the poller. I see that you are now doing this in destroy(), so this may not be needed anymore... Submitting anyway, in case you are still getting reports of SREQ.send() hanging in 0.13. Sorry I couldn't test this yet with 0.13.