mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-06 17:59:11 +00:00
drop permit reserved by poll_reserve (#1858)
This commit is contained in:
@@ -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))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user