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));