mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 09:19:51 +03:00
Send MQTT heartbeat immediately after connection
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user