diff --git a/src/net/tcp/stream.rs b/src/net/tcp/stream.rs index 4131783..ae8ca7d 100644 --- a/src/net/tcp/stream.rs +++ b/src/net/tcp/stream.rs @@ -356,6 +356,7 @@ impl Write for &TcpStream { } fn poll_close(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll> { + self.shutdown(std::net::Shutdown::Write)?; Poll::Ready(Ok(())) } }