mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
fix mqtt heartbeat #710
This commit is contained in:
@@ -373,14 +373,13 @@ void System::show_mem(const char * note) {
|
||||
|
||||
// send periodic MQTT message with system information
|
||||
void System::send_heartbeat() {
|
||||
// don't send heartbeat if WiFi is not connected
|
||||
int8_t rssi = wifi_quality();
|
||||
if (rssi == -1) {
|
||||
// don't send heartbeat if WiFi or MQTT is connected
|
||||
if (!Mqtt::connected()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// don't send if we're connecting to MQTT
|
||||
if (Mqtt::is_connecting()) {
|
||||
int8_t rssi = wifi_quality();
|
||||
if (rssi == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user