mirror of
https://github.com/actix/actix-web.git
synced 2024-11-18 15:41:17 +00:00
fix extra branch in h1 dispatcher timer (#1882)
This commit is contained in:
parent
c09186a2c0
commit
a4c9aaf337
1 changed files with 10 additions and 15 deletions
|
@ -687,15 +687,11 @@ where
|
||||||
if let Some(deadline) =
|
if let Some(deadline) =
|
||||||
this.codec.config().client_disconnect_timer()
|
this.codec.config().client_disconnect_timer()
|
||||||
{
|
{
|
||||||
if let Some(timer) = this.ka_timer.as_mut().as_pin_mut()
|
if let Some(mut timer) =
|
||||||
|
this.ka_timer.as_mut().as_pin_mut()
|
||||||
{
|
{
|
||||||
timer.reset(deadline);
|
timer.as_mut().reset(deadline);
|
||||||
let _ = this
|
let _ = timer.poll(cx);
|
||||||
.ka_timer
|
|
||||||
.as_mut()
|
|
||||||
.as_pin_mut()
|
|
||||||
.unwrap()
|
|
||||||
.poll(cx);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// no shutdown timeout, drop socket
|
// no shutdown timeout, drop socket
|
||||||
|
@ -720,15 +716,14 @@ where
|
||||||
} else if let Some(deadline) =
|
} else if let Some(deadline) =
|
||||||
this.codec.config().keep_alive_expire()
|
this.codec.config().keep_alive_expire()
|
||||||
{
|
{
|
||||||
if let Some(timer) = this.ka_timer.as_mut().as_pin_mut() {
|
if let Some(mut timer) = this.ka_timer.as_mut().as_pin_mut() {
|
||||||
timer.reset(deadline);
|
timer.as_mut().reset(deadline);
|
||||||
let _ =
|
let _ = timer.poll(cx);
|
||||||
this.ka_timer.as_mut().as_pin_mut().unwrap().poll(cx);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if let Some(timer) = this.ka_timer.as_mut().as_pin_mut() {
|
} else if let Some(mut timer) = this.ka_timer.as_mut().as_pin_mut() {
|
||||||
timer.reset(*this.ka_expire);
|
timer.as_mut().reset(*this.ka_expire);
|
||||||
let _ = this.ka_timer.as_mut().as_pin_mut().unwrap().poll(cx);
|
let _ = timer.poll(cx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Poll::Pending => {}
|
Poll::Pending => {}
|
||||||
|
|
Loading…
Reference in a new issue