diff --git a/Cargo.toml b/Cargo.toml index a6be2a967..a6f5b6e29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ session = ["cookie/secure"] brotli = ["brotli2"] [dependencies] -actix = "^0.5.2" +actix = "^0.5.4" base64 = "0.9" bitflags = "1.0" diff --git a/src/context.rs b/src/context.rs index 2e703ac15..aa6f4c49a 100644 --- a/src/context.rs +++ b/src/context.rs @@ -188,7 +188,7 @@ impl ActorHttpContext for HttpContext where A: Actor, mem::transmute(self as &mut HttpContext) }; - if !self.inner.started() || self.inner.started() && self.inner.alive() { + if self.inner.alive() { match self.inner.poll(ctx) { Ok(Async::NotReady) | Ok(Async::Ready(())) => (), Err(_) => return Err(ErrorInternalServerError("error").into()), diff --git a/src/ws/context.rs b/src/ws/context.rs index 7040345fb..4b0775f6a 100644 --- a/src/ws/context.rs +++ b/src/ws/context.rs @@ -204,9 +204,8 @@ impl ActorHttpContext for WebsocketContext where A: Actor) }; - if (!self.inner.started() || self.inner.started() && self.inner.alive()) - && self.inner.poll(ctx).is_err() { - return Err(ErrorInternalServerError("error").into()) + if self.inner.alive() && self.inner.poll(ctx).is_err() { + return Err(ErrorInternalServerError("error").into()) } // frames