3*PTO lower-bound for idle timeout

This commit is contained in:
Benjamin Saunders
2019-04-11 17:35:12 -07:00
committed by Dirkjan Ochtman
parent 4857ea9202
commit 4ba31453ca
+2 -2
View File
@@ -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) {