From d6dd1c2dabbc1801c1b68da357bf7fcaff4a47a0 Mon Sep 17 00:00:00 2001 From: int88 <106391185+int88@users.noreply.github.com> Date: Mon, 8 Apr 2024 23:15:25 +0800 Subject: [PATCH] chore: use `while` for all `poll_tick()` to make code consistent (#7510) --- crates/net/discv4/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/net/discv4/src/lib.rs b/crates/net/discv4/src/lib.rs index b79fe491d..0ac32a70c 100644 --- a/crates/net/discv4/src/lib.rs +++ b/crates/net/discv4/src/lib.rs @@ -1577,8 +1577,7 @@ impl Discv4Service { } // re-ping some peers - if self.ping_interval.poll_tick(cx).is_ready() { - let _ = self.ping_interval.poll_tick(cx); + while self.ping_interval.poll_tick(cx).is_ready() { self.re_ping_oldest(); }