always call shutdown

pull/742/head
dignifiedquire 4 years ago
parent 56769d8b6c
commit 1e99e3453f

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

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

Loading…
Cancel
Save