mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-23 22:51:07 +01:00
better inflight readiness check
This commit is contained in:
parent
132be0baa1
commit
8cdbf49187
@ -106,11 +106,12 @@ where
|
||||
type Future = InFlightServiceResponse<T, Request>;
|
||||
|
||||
fn poll_ready(&mut self) -> Poll<(), Self::Error> {
|
||||
let res = self.service.poll_ready();
|
||||
if res.is_ok() && !self.count.available() {
|
||||
let res = self.service.poll_ready()?;
|
||||
if res.is_ready() && !self.count.available() {
|
||||
log::trace!("InFlight limit exceeded");
|
||||
return Ok(Async::NotReady);
|
||||
}
|
||||
res
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
fn call(&mut self, req: Request) -> Self::Future {
|
||||
|
Loading…
Reference in New Issue
Block a user