first commit
This commit is contained in:
parent
509684090a
commit
b16268e617
@ -214,8 +214,6 @@ void mqtt_client_thread_func()
|
|||||||
|
|
||||||
while (!mqtt_restart_required && g_running)
|
while (!mqtt_restart_required && g_running)
|
||||||
{
|
{
|
||||||
auto now = std::chrono::steady_clock::now();
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
send_heartbeat();
|
send_heartbeat();
|
||||||
@ -224,7 +222,6 @@ void mqtt_client_thread_func()
|
|||||||
{
|
{
|
||||||
LOG_ERROR(std::string("[MQTT] Heartbeat error: ") + e.what());
|
LOG_ERROR(std::string("[MQTT] Heartbeat error: ") + e.what());
|
||||||
}
|
}
|
||||||
last_heartbeat = now;
|
|
||||||
|
|
||||||
std::this_thread::sleep_for(heartbeat_interval); // 固定周期
|
std::this_thread::sleep_for(heartbeat_interval); // 固定周期
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user