diff --git a/src/mqtt_client_wrapper.cpp b/src/mqtt_client_wrapper.cpp index 42df80a..266f23a 100644 --- a/src/mqtt_client_wrapper.cpp +++ b/src/mqtt_client_wrapper.cpp @@ -8,7 +8,7 @@ extern std::atomic g_running; std::atomic g_dispatch_id{""}; auto last_heartbeat = std::chrono::steady_clock::now(); -auto heartbeat_interval = std::chrono::milliseconds(static_cast(cfg.keep_alive * 0.9)); +auto heartbeat_interval = std::chrono::milliseconds(static_cast(g_app_config.mqtt.keep_alive * 0.9)); static void send_heartbeat() {