TcpStream: Shutdown write direction in poll_close.

Fixes #599.
split-by-pattern
Toralf Wittner 5 years ago
parent 63b6a2b961
commit c90732a805

@ -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(()))
}
}

Loading…
Cancel
Save