saltstack/salt — pull request #1431 by gavrie (2012-06-11 15:41:20+00:00)
Title: Re-register with poller after reconnecting socket

This seems like a horrendous bug that other people should have encountered as well, so unless I'm missing something, please take a look at this.

When the minion reaches `sub_timeout`, it closes the socket and creates a new one. However, it does not register the new socket with the poller, with the effect that it no longer receives publishes from the master.

The proposed patch fixes this, but it seems that there is still cleanup work to do (e.g. unregister the old socket from the poller; remove the duplicated lines that create the socket and set its options).