perf(net): put timeout check behind interval (#537)

This commit is contained in:
Matthias Seitz
2022-12-20 18:02:35 +01:00
committed by GitHub
parent f5c9064b44
commit 63406d5a6d

View File

@@ -452,8 +452,10 @@ impl Future for ActiveSession {
}
if !progress {
// check for timed out requests
this.evict_timed_out_requests(Instant::now());
if this.timeout_interval.poll_tick(cx).is_ready() {
// check for timed out requests
this.evict_timed_out_requests(Instant::now());
}
return Poll::Pending
}