drop permit reserved by poll_reserve (#1858)

This commit is contained in:
Luna Yao
2026-02-03 04:14:11 +01:00
committed by GitHub
parent 1e2124cb99
commit aebb7facfa
+8 -4
View File
@@ -78,10 +78,14 @@ impl UdpPoller for QuicSocketPoller {
self: Pin<&mut Self>, self: Pin<&mut Self>,
cx: &mut std::task::Context, cx: &mut std::task::Context,
) -> Poll<std::io::Result<()>> { ) -> Poll<std::io::Result<()>> {
self.get_mut() let tx = &mut self.get_mut().tx;
.tx
.poll_reserve(cx) let poll = tx.poll_reserve(cx);
.map_err(|e| std::io::Error::new(std::io::ErrorKind::BrokenPipe, e)) if let Poll::Ready(Ok(_)) = poll {
tx.abort_send();
}
poll.map_err(|e| std::io::Error::new(std::io::ErrorKind::BrokenPipe, e))
} }
} }