mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-30 18:44:36 +01:00
fix InOrderService::poll_ready() nested service rediness check
This commit is contained in:
parent
5e6eed905c
commit
21c289d7e4
@ -33,7 +33,7 @@ ssl = ["openssl", "tokio-openssl"]
|
|||||||
rust-tls = ["rustls", "tokio-rustls", "webpki", "webpki-roots"]
|
rust-tls = ["rustls", "tokio-rustls", "webpki", "webpki-roots"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-rt = "0.2.0"
|
actix-rt = "0.2.1"
|
||||||
actix-service = "0.3.3"
|
actix-service = "0.3.3"
|
||||||
actix-server-config = { path="../actix-server-config" }
|
actix-server-config = { path="../actix-server-config" }
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
* Fix `InFlightService::poll_ready()` nested service readiness check
|
* Fix `InFlightService::poll_ready()` nested service readiness check
|
||||||
|
|
||||||
|
* Fix `InOrderService::poll_ready()` nested service readiness check
|
||||||
|
|
||||||
|
|
||||||
## [0.3.3] - 2019-03-09
|
## [0.3.3] - 2019-03-09
|
||||||
|
|
||||||
|
@ -27,4 +27,4 @@ tokio-current-thread = "0.1.4"
|
|||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-rt = "0.2"
|
actix-rt = "0.2.1"
|
||||||
|
@ -140,9 +140,6 @@ where
|
|||||||
// poll_ready could be called from different task
|
// poll_ready could be called from different task
|
||||||
self.task.register();
|
self.task.register();
|
||||||
|
|
||||||
// check nested service
|
|
||||||
self.service.poll_ready().map_err(InOrderError::Service)?;
|
|
||||||
|
|
||||||
// check acks
|
// check acks
|
||||||
while !self.acks.is_empty() {
|
while !self.acks.is_empty() {
|
||||||
let rec = self.acks.front_mut().unwrap();
|
let rec = self.acks.front_mut().unwrap();
|
||||||
@ -156,8 +153,13 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check nested service
|
||||||
|
if let Async::NotReady = self.service.poll_ready().map_err(InOrderError::Service)? {
|
||||||
|
Ok(Async::NotReady)
|
||||||
|
} else {
|
||||||
Ok(Async::Ready(()))
|
Ok(Async::Ready(()))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn call(&mut self, request: S::Request) -> Self::Future {
|
fn call(&mut self, request: S::Request) -> Self::Future {
|
||||||
let (tx1, rx1) = oneshot::channel();
|
let (tx1, rx1) = oneshot::channel();
|
||||||
|
Loading…
Reference in New Issue
Block a user