perf: increase refill slots interval (#4528)

This commit is contained in:
Matthias Seitz
2023-09-08 18:33:02 +02:00
committed by GitHub
parent 0477f97773
commit 6ae6c9e71b

View File

@ -759,9 +759,7 @@ impl PeersManager {
}) })
} }
if self.refill_slots_interval.poll_tick(cx).is_ready() { while self.refill_slots_interval.poll_tick(cx).is_ready() {
// this ensures the manager will be polled periodically, see [Interval::poll_tick]
let _ = self.refill_slots_interval.poll_tick(cx);
self.fill_outbound_slots(); self.fill_outbound_slots();
} }
@ -1101,7 +1099,7 @@ pub struct PeersConfig {
impl Default for PeersConfig { impl Default for PeersConfig {
fn default() -> Self { fn default() -> Self {
Self { Self {
refill_slots_interval: Duration::from_millis(1_000), refill_slots_interval: Duration::from_millis(5_000),
connection_info: Default::default(), connection_info: Default::default(),
reputation_weights: Default::default(), reputation_weights: Default::default(),
ban_list: Default::default(), ban_list: Default::default(),