From e4a3b6eb73a60024ed1c4094964d83d905a57490 Mon Sep 17 00:00:00 2001 From: Sajjad Pourali Date: Mon, 4 Mar 2024 10:20:40 -0500 Subject: [PATCH] fix poll_shutdown --- src/stream/tcp.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/stream/tcp.rs b/src/stream/tcp.rs index 16f5afe..a24a25c 100644 --- a/src/stream/tcp.rs +++ b/src/stream/tcp.rs @@ -478,19 +478,12 @@ impl AsyncWrite for IpStackTcpStream { std::task::Poll::Ready(Ok(())) } - #[allow(unused_mut, unused_variables)] fn poll_shutdown( mut self: std::pin::Pin<&mut Self>, cx: &mut std::task::Context<'_>, ) -> std::task::Poll> { - /* let notified = self.shutdown.get_or_insert(Notify::new()).notified(); - match Pin::new(&mut Box::pin(notified)).poll(cx) { - std::task::Poll::Ready(_) => std::task::Poll::Ready(Ok(())), - std::task::Poll::Pending => std::task::Poll::Pending, - } - // */ - std::task::Poll::Ready(Ok(())) + Pin::new(&mut Box::pin(notified)).poll(cx).map(Ok) } }