mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-23 22:51:07 +01:00
fix InFlightService::poll_ready() nested service rediness check
This commit is contained in:
parent
6801a38de5
commit
5e6eed905c
@ -6,6 +6,11 @@
|
||||
|
||||
* `TimeoutService`, `InOrderService`, `InFlightService` accepts generic IntoService services.
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fix `InFlightService::poll_ready()` nested service readiness check
|
||||
|
||||
|
||||
## [0.3.3] - 2019-03-09
|
||||
|
||||
### Changed
|
||||
|
@ -221,7 +221,7 @@ where
|
||||
fn poll_read(&mut self) -> bool {
|
||||
loop {
|
||||
match self.service.poll_ready() {
|
||||
Ok(Async::Ready(_)) => loop {
|
||||
Ok(Async::Ready(_)) => {
|
||||
let item = match self.framed.poll() {
|
||||
Ok(Async::Ready(Some(el))) => el,
|
||||
Err(err) => {
|
||||
@ -244,7 +244,7 @@ where
|
||||
inner.task.notify();
|
||||
Ok(())
|
||||
}));
|
||||
},
|
||||
}
|
||||
Ok(Async::NotReady) => return false,
|
||||
Err(err) => {
|
||||
self.state = TransportState::Error(FramedTransportError::Service(err));
|
||||
|
@ -67,9 +67,9 @@ where
|
||||
type Future = InFlightServiceResponse<T>;
|
||||
|
||||
fn poll_ready(&mut self) -> Poll<(), Self::Error> {
|
||||
self.service.poll_ready()?;
|
||||
|
||||
if !self.count.available() {
|
||||
if let Async::NotReady = self.service.poll_ready()? {
|
||||
Ok(Async::NotReady)
|
||||
} else if !self.count.available() {
|
||||
log::trace!("InFlight limit exceeded");
|
||||
Ok(Async::NotReady)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user