diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index 7dafdd76e..57ba3ecc0 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -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) - "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 +- show MQTT connection error only once on the first connect failure ## Changed diff --git a/src/core/mqtt.cpp b/src/core/mqtt.cpp index 7067cdd99..2ac2349f3 100644 --- a/src/core/mqtt.cpp +++ b/src/core/mqtt.cpp @@ -472,8 +472,8 @@ bool Mqtt::get_publish_onchange(uint8_t device_type) { return false; } void Mqtt::on_disconnect(espMqttClientTypes::DisconnectReason reason) { - // only show the error once, not every 2 seconds - if (!connecting_) { + // only show the error once on the first connect failure + if (connectcount_) { return; } connecting_ = false;