From aebb7facfa67def192c4fb597570f211b0b90ee2 Mon Sep 17 00:00:00 2001 From: Luna Yao <40349250+ZnqbuZ@users.noreply.github.com> Date: Tue, 3 Feb 2026 04:14:11 +0100 Subject: [PATCH] drop permit reserved by poll_reserve (#1858) --- easytier/src/gateway/quic_proxy.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/easytier/src/gateway/quic_proxy.rs b/easytier/src/gateway/quic_proxy.rs index 12593ef8..4178cc03 100644 --- a/easytier/src/gateway/quic_proxy.rs +++ b/easytier/src/gateway/quic_proxy.rs @@ -78,10 +78,14 @@ impl UdpPoller for QuicSocketPoller { self: Pin<&mut Self>, cx: &mut std::task::Context, ) -> Poll> { - self.get_mut() - .tx - .poll_reserve(cx) - .map_err(|e| std::io::Error::new(std::io::ErrorKind::BrokenPipe, e)) + let tx = &mut self.get_mut().tx; + + let poll = tx.poll_reserve(cx); + if let Poll::Ready(Ok(_)) = poll { + tx.abort_send(); + } + + poll.map_err(|e| std::io::Error::new(std::io::ErrorKind::BrokenPipe, e)) } }