1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-28 02:49:02 +02:00

use server keep-alive timer as slow request timer

This commit is contained in:
Nikolay Kim
2018-09-15 09:55:38 -07:00
parent c3f8b5cf22
commit d65c72b44d
9 changed files with 81 additions and 30 deletions

View File

@ -59,6 +59,7 @@ where
{
pub fn new(
settings: Rc<WorkerSettings<H>>, io: T, addr: Option<SocketAddr>, buf: Bytes,
keepalive_timer: Option<Delay>,
) -> Self {
let extensions = io.extensions();
Http2 {
@ -68,10 +69,10 @@ where
unread: if buf.is_empty() { None } else { Some(buf) },
inner: io,
})),
keepalive_timer: None,
addr,
settings,
extensions,
keepalive_timer,
}
}