2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-02-06 04:35:32 +00:00

TcpStream: Shutdown write direction in poll_close.

Fixes #599.
This commit is contained in:
Toralf Wittner 2019-12-12 17:37:38 +01:00
parent 63b6a2b961
commit c90732a805

View file

@ -356,6 +356,7 @@ impl Write for &TcpStream {
}
fn poll_close(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<io::Result<()>> {
self.shutdown(std::net::Shutdown::Write)?;
Poll::Ready(Ok(()))
}
}