From b6560306baee792bf05e72530858e162fab1392a Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Thu, 22 Oct 2026 12:12:27 -0300 Subject: [PATCH] avoid reconnect timer being disrupted by possible SNTP updates --- tutorials/mqtt/mqtt-client/mongoose_mqtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/mqtt/mqtt-client/mongoose_mqtt.c b/tutorials/mqtt/mqtt-client/mongoose_mqtt.c index a05257d1..50598c91 100644 --- a/tutorials/mqtt/mqtt-client/mongoose_mqtt.c +++ b/tutorials/mqtt/mqtt-client/mongoose_mqtt.c @@ -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,