show MQTT connection error only once on the first connect failure

This commit is contained in:
proddy
2026-08-09 12:28:17 +02:00
parent e4d127db67
commit 9c992d8fda
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -20,6 +20,7 @@ This release is based on the latest Espressif/Arduino core version 3. It brings
- Ethernet MAC address changed with the new SDK, breaking DHCP reservations (currently disabled) - Ethernet MAC address changed with the new SDK, breaking DHCP reservations (currently disabled)
- "IPv4 nameserver" showed an IPv6 address when IPv6 was in use - "IPv4 nameserver" showed an IPv6 address when IPv6 was in use
- HA Discovery warning on Uptime after EMS-ESP boot due to NTP not ready - HA Discovery warning on Uptime after EMS-ESP boot due to NTP not ready
- show MQTT connection error only once on the first connect failure
## Changed ## Changed
+2 -2
View File
@@ -472,8 +472,8 @@ bool Mqtt::get_publish_onchange(uint8_t device_type) {
return false; return false;
} }
void Mqtt::on_disconnect(espMqttClientTypes::DisconnectReason reason) { void Mqtt::on_disconnect(espMqttClientTypes::DisconnectReason reason) {
// only show the error once, not every 2 seconds // only show the error once on the first connect failure
if (!connecting_) { if (connectcount_) {
return; return;
} }
connecting_ = false; connecting_ = false;