From 621956aca25949c537087ed60dc9017dc13d0d59 Mon Sep 17 00:00:00 2001 From: Federico Lolli <federico.lolli@skywarder.eu> Date: Thu, 21 Nov 2024 18:39:15 +0100 Subject: [PATCH] [on-host] added serialport timeout explicitly --- on-host/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/on-host/src/main.rs b/on-host/src/main.rs index 7d2255f..2967d8d 100644 --- a/on-host/src/main.rs +++ b/on-host/src/main.rs @@ -69,6 +69,7 @@ fn main() -> Result<()> { }; debug!("connecting to serial port {}...", port_name); let mut port = serialport::new(port_name, args.baud_rate) + .timeout(Duration::from_millis(100)) .open() .into_diagnostic() .wrap_err("Failed to open serial port")?; -- GitLab