From ccbb23ebc706ddc7c373539c1f1acc7def33d314 Mon Sep 17 00:00:00 2001 From: Ollo Date: Fri, 25 Apr 2025 21:15:57 +0200 Subject: [PATCH] MQTT server connection is printed --- client/bin/src/main.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/client/bin/src/main.rs b/client/bin/src/main.rs index a773be2..23fc7ec 100644 --- a/client/bin/src/main.rs +++ b/client/bin/src/main.rs @@ -572,7 +572,16 @@ fn main_function(parameter1: String, parameter2: Option) -> ExitCode { // Make the connection to the broker println!("MQTT | Connecting to the MQTT server..."); - local_mqtt.connect(conn_opts); + let result = local_mqtt.connect(conn_opts); + + match result { + Ok(_) => { + println!("MQTT | Server connected"); + }, + Err(error) => { + println!("MQTT | Server connecting {error:?}"); + }, + } // move local instance to global scope gmc.set_mqtt_client(Some(local_mqtt));