MQTT server connection is printed
This commit is contained in:
parent
35d65b6475
commit
ccbb23ebc7
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user