Closed beikeland closed 4 years ago
This looks correct to me, try and reconnect continuously for 5s (now < 50000)
then try to re-connect every 10s ((now - lastMqttReconnectAttempt) > 100000))
5 seconds is 5,000ms not 50,000ms which explains my trouble with mqtt thinking it was the server not accepting the connection, but instead it was the wifi waiting almost two minutes to reconnect, despite thinking it should take 10 seconds.
Damit, I was obviously blind to the number of zeros! Thanks, I've made the changes to fix
https://github.com/OpenEVSE/ESP8266_WiFi_v2.x/blob/76577408ca1ce8d8266db463adfe5f0b173b1d86/src/mqtt.cpp#L187-L188
Not sure if comment or code is correct, but 5s != 50000ms