diff --git a/crates/wasi/src/preview2/host/tcp.rs b/crates/wasi/src/preview2/host/tcp.rs index 0cf88b9100a4..09ec97009352 100644 --- a/crates/wasi/src/preview2/host/tcp.rs +++ b/crates/wasi/src/preview2/host/tcp.rs @@ -470,26 +470,6 @@ impl crate::preview2::host::tcp::tcp::HostTcpSocket for T { // As in the filesystem implementation, we assume closing a socket // doesn't block. let dropped = table.delete_resource(this)?; - - // If we might have an `event::poll` waiting on the socket, wake it up. - #[cfg(not(unix))] - { - match dropped.tcp_state { - TcpState::Default - | TcpState::BindStarted - | TcpState::Bound - | TcpState::ListenStarted - | TcpState::ConnectReady => {} - - TcpState::Listening | TcpState::Connecting | TcpState::Connected => { - match rustix::net::shutdown(&*dropped.inner, rustix::net::Shutdown::ReadWrite) { - Ok(()) | Err(Errno::NOTCONN) => {} - Err(err) => Err(err).unwrap(), - } - } - } - } - drop(dropped); Ok(()) diff --git a/crates/wasi/src/preview2/host/udp.rs b/crates/wasi/src/preview2/host/udp.rs index acf67a41e678..b6dba8be158e 100644 --- a/crates/wasi/src/preview2/host/udp.rs +++ b/crates/wasi/src/preview2/host/udp.rs @@ -407,25 +407,6 @@ impl crate::preview2::host::udp::udp::HostUdpSocket for T { // As in the filesystem implementation, we assume closing a socket // doesn't block. let dropped = table.delete_resource(this)?; - - // If we might have an `event::poll` waiting on the socket, wake it up. - #[cfg(not(unix))] - { - match dropped.udp_state { - UdpState::Default - | UdpState::BindStarted - | UdpState::Bound - | UdpState::ConnectReady => {} - - UdpState::Connecting | UdpState::Connected => { - match rustix::net::shutdown(&*dropped.inner, rustix::net::Shutdown::ReadWrite) { - Ok(()) | Err(Errno::NOTCONN) => {} - Err(err) => Err(err).unwrap(), - } - } - } - } - drop(dropped); Ok(())