From c485fbd21dced328b8eadfd3b51efc6a48dc38c3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sat, 8 Jul 2023 13:26:49 +0200 Subject: [PATCH] get rid of some more panics --- satrs-example/src/tmtc.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/satrs-example/src/tmtc.rs b/satrs-example/src/tmtc.rs index 62df0ca..6a4fb2f 100644 --- a/satrs-example/src/tmtc.rs +++ b/satrs-example/src/tmtc.rs @@ -217,10 +217,9 @@ fn core_tm_handling(udp_tmtc_server: &mut UdpTmtcServer, recv_addr: &SocketAddr) } else { info!("Sending PUS TM"); } - udp_tmtc_server - .udp_tc_server - .socket - .send_to(buf, recv_addr) - .expect("sending TM failed"); + let result = udp_tmtc_server.udp_tc_server.socket.send_to(buf, recv_addr); + if let Err(e) = result { + warn!("Sending TM with UDP socket failed: {e}") + } } }