avoid reconnect timer being disrupted by possible SNTP updates

This commit is contained in:
Sergio R. Caprile committed 2026-10-22 12:12:27 -03:00
1 parent 5b39c93478
commit b6560306ba
1 file changed
+1 -1
+1 -1
View File
@@ -120,7 +120,7 @@ void mg_mqtt_poll(struct mg_mgr *mgr) {
// Reconnect if connection is closed, and send MQTT PINGs to keep
// the connection alive or to detect connection loss
if (mg_timer_expired(&timer, MQTT_RECONNECT_PERIOD_MS, mg_now())) {
if (mg_timer_expired(&timer, MQTT_RECONNECT_PERIOD_MS, mg_millis())) {
if (s_mqtt_conn == NULL) {
struct mg_mqtt_opts opts = {
.clean = true,