Closed shbatm closed 4 days ago
Thanks for doing the groundwork on this. There is a lot of history behind that setting both with bugs in mongoose and mosquitto documentation. It’s probably the latest version of mosquitto that’s highlighted this again, at one point I used my own ping rather than mongoose and may have to resort back to that as to not break all the different versions people run. But hope a simple config addition like you suggested will work.
After successful setup and connection to my MQTT Broker: (Mosquitto Add-on for Home Assistant), running on another server, I was noticing frequent disconnects from the broker every ~2 minutes with 10s delays between reconnection.
I recompiled the code changing this line to
And the reconnect issue went away. I'm not sure if there's another reason the keep-alive is set so much shorter than the MQTT default 60s, but resetting it has kept everything connected.
Not sure if this is just an issue for me or if its more widespread. If there's another reason for it being so short, maybe this could be a config option?
Otherwise, thanks for the program, working great so far!