Merge pull request #618 from twittner/poll_close_shutdown

TcpStream: Shutdown write direction in poll_close.
split-by-pattern
Yoshua Wuyts 5 years ago committed by GitHub
commit 96d6fc43d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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