From 9ab03c4fcfc9f4d6a5b1e59e04a7405f7bb997fe Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Thu, 16 Mar 2023 15:16:14 +0100 Subject: [PATCH] link fixes --- sw/deployer/src/sc64/link.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sw/deployer/src/sc64/link.rs b/sw/deployer/src/sc64/link.rs index 2f00d98..6dc5c86 100644 --- a/sw/deployer/src/sc64/link.rs +++ b/sw/deployer/src/sc64/link.rs @@ -117,7 +117,7 @@ impl Serial { Ok(0) => return Err(Error::new("Unexpected end of serial data")), Ok(bytes) => position += bytes, Err(error) => match error.kind() { - ErrorKind::Interrupted | ErrorKind::TimedOut => { + ErrorKind::Interrupted | ErrorKind::TimedOut | ErrorKind::WouldBlock => { if !block && position == 0 { return Ok(None); } @@ -243,7 +243,7 @@ impl TcpBackend { Ok(0) => return Err(Error::new("Unexpected end of stream data")), Ok(bytes) => position += bytes, Err(error) => match error.kind() { - ErrorKind::Interrupted | ErrorKind::TimedOut => { + ErrorKind::Interrupted | ErrorKind::TimedOut | ErrorKind::WouldBlock => { if !block && position == 0 { return Ok(None); } @@ -618,7 +618,7 @@ fn server_stream_thread( Ok(0) => return Ok(()), Ok(bytes) => header_position += bytes, Err(error) => match error.kind() { - ErrorKind::Interrupted | ErrorKind::TimedOut => {} + ErrorKind::Interrupted | ErrorKind::TimedOut | ErrorKind::WouldBlock => {} _ => return Err(error.into()), }, }