Improve timeout mechanisms #17

Open
njh opened this Issue Feb 4, 2012 · 3 comments

Projects

None yet

2 participants

@njh
Owner
njh commented Feb 4, 2012

Detect hung connections.

Check:

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

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

@njh
Owner

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

@balwantk

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?

-Balwant

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