dlecocq / nsq-py

Hacking on Python NSQ Bindings
MIT License
44 stars 16 forks source link

Add stale connection reconnection handling #37

Closed ryan-lane closed 9 years ago

ryan-lane commented 9 years ago

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.

dlecocq commented 9 years ago

Looks good. Thanks!