forked from mirror/async-std
Merge pull request #618 from twittner/poll_close_shutdown
TcpStream: Shutdown write direction in poll_close.
This commit is contained in:
commit
96d6fc43d6
1 changed files with 1 additions and 0 deletions
|
@ -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…
Reference in a new issue