Send MQTT heartbeat immediately after connection

This commit is contained in:
Proddy
2024-02-21 23:04:32 +01:00
parent 24f2d86059
commit 189ea6b23d
2 changed files with 2 additions and 1 deletions

View File

@@ -41,3 +41,4 @@
- small changes to the API for analog and temperature sensors
- Length of mqtt Broker adress [#1619](https://github.com/emsesp/EMS-ESP32/issues/1619)
- C++ optimizations - see <https://github.com/emsesp/EMS-ESP32/pull/1615>
- Send MQTT heartbeat immediately after connection

View File

@@ -508,7 +508,7 @@ void Mqtt::on_connect() {
resubscribe();
// publish to the last will topic (see Mqtt::start() function) to say we're alive
queue_publish_retain("status", "online", true); // with retain on
queue_publish_retain("status", "online", false); // with retain off
// mqtt_publish_fails_ = 0; // reset fail count to 0
}