saltstack/salt — pull request #3024 by s0undt3ch (2012-12-26 15:07:24+00:00)
Title: Fix #3015

* Convert tabs to spaces. Refs #3015.
* Don't touch closed ZMQ socket's and/or context's. Fixes #3015: On some occasions it seems that `salt.utils.event.SaltEvent.destroy()` is called twice and the errors exhibited on #3015 would show up on the second time we would try to set the linger socket option since that socket was already closed. So, even though on some parts of code which I changed in this commit weren't giving any problems, I ended up using the same recipe all around, if the socket is open, set the linger option and close it, plus, if open, also close the context.