Skip to content

Commit

Permalink
fix(wasi-common): convert ErrorKind::WouldBlock instead of trapping (
Browse files Browse the repository at this point in the history
…#7686)

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
  • Loading branch information
haraldh authored Dec 14, 2023
1 parent b411c21 commit 81e383f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/wasi-common/src/snapshots/preview_1/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ impl From<std::io::Error> for Error {
std::io::ErrorKind::PermissionDenied => Errno::Perm.into(),
std::io::ErrorKind::AlreadyExists => Errno::Exist.into(),
std::io::ErrorKind::InvalidInput => Errno::Inval.into(),
std::io::ErrorKind::WouldBlock => Errno::Again.into(),
_ => Error::trap(anyhow::anyhow!(err).context("Unknown OS error")),
},
}
Expand Down

0 comments on commit 81e383f

Please sign in to comment.