From fca1069b8a549e39b51206f9000f64f883024023 Mon Sep 17 00:00:00 2001 From: Daniel Egger Date: Mon, 27 Jan 2020 15:17:14 +0100 Subject: [PATCH] Arbiter::exec to start TcpServer will not work, simply call it (#118) Fixes #115 Signed-off-by: Daniel Egger --- websocket-tcp-chat/src/main.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/websocket-tcp-chat/src/main.rs b/websocket-tcp-chat/src/main.rs index b6952ae0..0d8f55b8 100644 --- a/websocket-tcp-chat/src/main.rs +++ b/websocket-tcp-chat/src/main.rs @@ -1,5 +1,3 @@ -use serde::{Deserialize, Serialize}; - use std::time::{Duration, Instant}; use actix::*; @@ -229,10 +227,7 @@ async fn main() -> std::io::Result<()> { // Start tcp server in separate thread let srv = server.clone(); - Arbiter::new().exec(move || { - session::tcp_server("127.0.0.1:12345", srv); - Ok::<_, ()>(()) - }); + session::tcp_server("127.0.0.1:12345", srv); println!("Started http server: 127.0.0.1:8080");