From 1fe4315c943c66a37f6197d9db124bccf4901b8a Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 16 Mar 2018 13:37:47 -0700 Subject: [PATCH] use actix 0.5.4 --- Cargo.toml | 2 +- src/context.rs | 2 +- src/ws/context.rs | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) 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