Improve timeout mechanisms #17

njh opened this Issue Feb 4, 2012 · 3 comments


None yet

2 participants

njh commented Feb 4, 2012

Detect hung connections.


  • a packet has been sent recently
  • a packet has been received recently

@njh what action does one take if at all it has hung?


It should send a disconnect packet and then close the TCP socket.


In the name of fault tolerance, wouldn't it be better to:

  • Send a ping, wait 10 seconds for a resp.
  • If resp great.
  • If no resp, disconnect, and try to reconnect a few times.
  • If it works, and we get a resp good.
  • Else close the connection and raise like a MQTT::ConnectionError.

Your thoughts?


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment