The current check for whether a socket is alive or not isn't sufficient. It never fails, even if NSQ is unreachable. This change checks for stale connections and reconnects. Assuming the library is keeping up with the heartbeats or receiving data, it'll never need to reconnect due to staleness.
The current check for whether a socket is alive or not isn't sufficient. It never fails, even if NSQ is unreachable. This change checks for stale connections and reconnects. Assuming the library is keeping up with the heartbeats or receiving data, it'll never need to reconnect due to staleness.