mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-09-13 13:44:10 +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)
|
- 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
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user