fixing heartbeats and potential disconnects during publishing
Closing old socket, just in case, adding comment
Merge pull request #1 from shipwire/heartbeat-fix

fixing heartbeats and potential disconnects during publishing