From 9d4a4ecd34f19d0bff1df77e1f9f33c9db029526 Mon Sep 17 00:00:00 2001 From: ju6ge Date: Tue, 5 May 2026 21:10:08 +0200 Subject: [PATCH] refactor: call mqtt::mqtt_init() from connection orchestration --- rust/src/main.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/rust/src/main.rs b/rust/src/main.rs index bb4f785..3d9c570 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -745,12 +745,7 @@ async fn try_connect_wifi_sntp_mqtt( let mqtt_connected = if board.board_hal.get_config().network.mqtt_url.is_some() { let nw_config = board.board_hal.get_config().network.clone(); let nw_config = mk_static!(NetworkConfig, nw_config); - match board - .board_hal - .get_esp() - .mqtt(nw_config, stack, spawner) - .await - { + match mqtt::mqtt_init(nw_config, stack, spawner).await { Ok(_) => { info!("Mqtt connection ready"); true