mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
Send MQTT heartbeat immediately after connection
This commit is contained in:
@@ -41,3 +41,4 @@
|
|||||||
- small changes to the API for analog and temperature sensors
|
- small changes to the API for analog and temperature sensors
|
||||||
- Length of mqtt Broker adress [#1619](https://github.com/emsesp/EMS-ESP32/issues/1619)
|
- 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>
|
- C++ optimizations - see <https://github.com/emsesp/EMS-ESP32/pull/1615>
|
||||||
|
- Send MQTT heartbeat immediately after connection
|
||||||
|
|||||||
@@ -508,7 +508,7 @@ void Mqtt::on_connect() {
|
|||||||
resubscribe();
|
resubscribe();
|
||||||
|
|
||||||
// publish to the last will topic (see Mqtt::start() function) to say we're alive
|
// 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
|
// mqtt_publish_fails_ = 0; // reset fail count to 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user