MQTT server connection is printed

This commit is contained in:
Ollo 2025-04-25 21:15:57 +02:00
parent 35d65b6475
commit ccbb23ebc7

View File

@ -572,7 +572,16 @@ fn main_function(parameter1: String, parameter2: Option<String>) -> 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));