fix: socket shutdown wrong implement (#893)

This commit is contained in:
Samuel Dai 2024-08-15 18:30:44 +08:00 committed by GitHub
parent f4acaec4ea
commit 09836e1b39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -345,7 +345,7 @@ impl Syscall {
.get_socket(fd as i32) .get_socket(fd as i32)
.ok_or(SystemError::EBADF)?; .ok_or(SystemError::EBADF)?;
let mut socket = unsafe { socket.inner_no_preempt() }; let mut socket = unsafe { socket.inner_no_preempt() };
socket.shutdown(ShutdownType::from_bits_truncate(how as u8))?; socket.shutdown(ShutdownType::from_bits_truncate((how + 1) as u8))?;
return Ok(0); return Ok(0);
} }