close tcp connection when restarting

This commit is contained in:
Vladan Popovic 2023-02-20 17:29:54 +01:00
parent c9e80434fe
commit d71a7bb2a9
1 changed files with 1 additions and 0 deletions

View File

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