From d39d1917adf5fecdc59cbf5deb1548b55a0b9c6c Mon Sep 17 00:00:00 2001 From: omgbebebe Date: Tue, 18 Nov 2025 02:54:02 +0400 Subject: [PATCH] mqtt: do not try to send packets when it disconnected (#8658) --- src/mqtt/MQTT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index ad35e152a..2dcfd80e1 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -692,7 +692,7 @@ void MQTT::publishNodeInfo() } void MQTT::publishQueuedMessages() { - if (mqttQueue.isEmpty()) + if (mqttQueue.isEmpty() || !isConnected) return; if (!moduleConfig.mqtt.proxy_to_client_enabled && !isConnected)