From ebbaf68fd6b68433c13b8aa1ebc3b55e21ac2bc8 Mon Sep 17 00:00:00 2001 From: Nathan Seidle Date: Tue, 10 Dec 2024 09:20:56 -0700 Subject: [PATCH] Correctly mark MQTT client online The online tag allows the client to notify the network that it needs the network, thus preventing network shutdown before the client has moved offline. --- Firmware/RTK_Everywhere/MQTT_Client.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Firmware/RTK_Everywhere/MQTT_Client.ino b/Firmware/RTK_Everywhere/MQTT_Client.ino index 90cc994f..84a7048f 100644 --- a/Firmware/RTK_Everywhere/MQTT_Client.ino +++ b/Firmware/RTK_Everywhere/MQTT_Client.ino @@ -870,6 +870,9 @@ void mqttClientUpdate() millis(); // Prevent MQTT_CLIENT_SERVICES_CONNECTED from going immediately into timeout reportHeapNow(settings.debugMqttClientState); + + online.mqttClient = true; + mqttClientSetState(MQTT_CLIENT_SERVICES_CONNECTED); break;