diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index 9ba8bb590..c77c6f712 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -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 +- Send MQTT heartbeat immediately after connection diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 3a2bdf819..2d736aa37 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -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 }