diff --git a/examples/websocket-chat/Cargo.toml b/examples/websocket-chat/Cargo.toml index f5534f9be..a155e0e11 100644 --- a/examples/websocket-chat/Cargo.toml +++ b/examples/websocket-chat/Cargo.toml @@ -25,5 +25,6 @@ serde = "1.0" serde_json = "1.0" serde_derive = "1.0" -actix = "0.4" +#actix = "0.4" +actix = { git = "https://github.com/actix/actix" } actix-web = { git = "https://github.com/actix/actix-web" } diff --git a/examples/websocket-chat/src/client.rs b/examples/websocket-chat/src/client.rs index f1e52e051..c57825fc9 100644 --- a/examples/websocket-chat/src/client.rs +++ b/examples/websocket-chat/src/client.rs @@ -67,11 +67,13 @@ impl Actor for ChatClient { self.hb(ctx) } - fn stopping(&mut self, _: &mut FramedContext) { + fn stopping(&mut self, _: &mut FramedContext) -> bool { println!("Disconnected"); // Stop application on disconnect Arbiter::system().send(actix::msgs::SystemExit(0)); + + true } } diff --git a/examples/websocket-chat/src/main.rs b/examples/websocket-chat/src/main.rs index 633c6556c..aec05ec74 100644 --- a/examples/websocket-chat/src/main.rs +++ b/examples/websocket-chat/src/main.rs @@ -75,9 +75,10 @@ impl Actor for WsChatSession { }).wait(ctx); } - fn stopping(&mut self, ctx: &mut Self::Context) { + fn stopping(&mut self, ctx: &mut Self::Context) -> bool { // notify chat server ctx.state().addr.send(server::Disconnect{id: self.id}); + true } } diff --git a/examples/websocket-chat/src/session.rs b/examples/websocket-chat/src/session.rs index 47c0d0be4..b0725fde4 100644 --- a/examples/websocket-chat/src/session.rs +++ b/examples/websocket-chat/src/session.rs @@ -52,10 +52,10 @@ impl Actor for ChatSession { }).wait(ctx); } - fn stopping(&mut self, ctx: &mut Self::Context) { + fn stopping(&mut self, ctx: &mut Self::Context) -> bool { // notify chat server self.addr.send(server::Disconnect{id: self.id}); - ctx.stop() + true } } diff --git a/examples/websocket/Cargo.toml b/examples/websocket/Cargo.toml index 5c6bd9889..e75f5c390 100644 --- a/examples/websocket/Cargo.toml +++ b/examples/websocket/Cargo.toml @@ -10,5 +10,6 @@ path = "src/main.rs" [dependencies] env_logger = "*" futures = "0.1" -actix = "0.4" +#actix = "0.4" +actix = { git = "https://github.com/actix/actix.git" } actix-web = { git = "https://github.com/actix/actix-web.git" }