gausby / tortoise

A MQTT Client written in Elixir
Apache License 2.0
314 stars 54 forks source link

Handle :ping_timeout more gracefully? #116

Open roylez opened 5 years ago

roylez commented 5 years ago

From time to time, I see :ping_timeout errors after connection is established. I think this could be handled more gracefully without stopping the connection genserv by resetting its state, and going back to connecting stage.

Probably part of the code in Tortoise. Connection.start_link/2 could be moved to a handle_continue or handle_info to make this easier.

gausby commented 4 years ago

I am working on a upgrade that will support MQTT 5, and that will introduce a redesign in the process architecture…I will give it some thoughts when I get back to that work.