mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-18 17:26:19 +00:00
3*PTO lower-bound for idle timeout
This commit is contained in:
committed by
Dirkjan Ochtman
parent
4857ea9202
commit
4ba31453ca
@@ -770,8 +770,8 @@ impl Connection {
|
||||
self.io.timer_stop(Timer::Idle);
|
||||
return;
|
||||
}
|
||||
self.io
|
||||
.timer_start(Timer::Idle, now + Duration::from_millis(self.idle_timeout));
|
||||
let dt = cmp::max(Duration::from_millis(self.idle_timeout), 3 * self.pto());
|
||||
self.io.timer_start(Timer::Idle, now + dt);
|
||||
}
|
||||
|
||||
fn reset_keep_alive(&mut self, now: Instant) {
|
||||
|
||||
Reference in New Issue
Block a user