diff --git a/src/mqtt_client_wrapper.cpp b/src/mqtt_client_wrapper.cpp index 319490d..b868120 100644 --- a/src/mqtt_client_wrapper.cpp +++ b/src/mqtt_client_wrapper.cpp @@ -214,8 +214,6 @@ void mqtt_client_thread_func() while (!mqtt_restart_required && g_running) { - auto now = std::chrono::steady_clock::now(); - try { send_heartbeat(); @@ -224,7 +222,6 @@ void mqtt_client_thread_func() { LOG_ERROR(std::string("[MQTT] Heartbeat error: ") + e.what()); } - last_heartbeat = now; std::this_thread::sleep_for(heartbeat_interval); // 固定周期 }