close tcp connection when restarting

This commit is contained in:
Vladan Popovic 2023-02-20 17:29:54 +01:00
parent c9e80434fe
commit d71a7bb2a9

View file

@ -84,6 +84,7 @@ fn main() -> anyhow::Result<()> {
println!("resetting modem ... "); println!("resetting modem ... ");
println!("======================= MODEM ======================="); println!("======================= MODEM =======================");
let _ = mdm.start_sending(mqtt_username, mqtt_password).unwrap_or(()); let _ = mdm.start_sending(mqtt_username, mqtt_password).unwrap_or(());
let _ = mdm.tcp_close_connection().unwrap_or(());
thread::sleep(Duration::from_millis(1500)); thread::sleep(Duration::from_millis(1500));
} }
} }