Skip to content

Commit

Permalink
fix poll_shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajjad Pourali authored and Sajjad Pourali committed Mar 4, 2024
1 parent 868a11f commit e4a3b6e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/stream/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Result<(), std::io::Error>> {
/*
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)
}
}

Expand Down

0 comments on commit e4a3b6e

Please sign in to comment.