diff --git a/lib/wasix/src/syscalls/wasix/sock_recv.rs b/lib/wasix/src/syscalls/wasix/sock_recv.rs index 0dfafd09c2c..565a80e3f06 100644 --- a/lib/wasix/src/syscalls/wasix/sock_recv.rs +++ b/lib/wasix/src/syscalls/wasix/sock_recv.rs @@ -27,7 +27,7 @@ pub fn sock_recv( ro_flags: WasmPtr, ) -> Result { let env = ctx.data(); - let fd_entry = env.state.fs.get_fd(sock).unwrap(); + let fd_entry = wasi_try_ok!(env.state.fs.get_fd(sock)); let guard = fd_entry.inode.read(); let use_read = matches!(guard.deref(), Kind::Pipe { .. }); drop(guard);