mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-09-13 21:54:07 +00:00
show MQTT connection error only once on the first connect failure
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user