mirror of
https://github.com/actix/actix-web.git
synced 2025-01-03 13:58:44 +00:00
do not self wake up when have a payload (#1984)
This commit is contained in:
parent
ce9b2770e2
commit
95113ad12f
1 changed files with 6 additions and 1 deletions
|
@ -745,7 +745,12 @@ where
|
||||||
// at this point it's not known io is still scheduled to
|
// at this point it's not known io is still scheduled to
|
||||||
// be waked up. so force wake up dispatcher just in case.
|
// be waked up. so force wake up dispatcher just in case.
|
||||||
// TODO: figure out the overhead.
|
// TODO: figure out the overhead.
|
||||||
cx.waker().wake_by_ref();
|
if this.payload.is_none() {
|
||||||
|
// When dispatcher has a payload. The responsibility of
|
||||||
|
// wake up stream would be shift to PayloadSender.
|
||||||
|
// Therefore no self wake up is needed.
|
||||||
|
cx.waker().wake_by_ref();
|
||||||
|
}
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue