From 342a1946051b66345c4aeae212a15877c32ca800 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sat, 16 Jun 2018 22:56:27 +0600 Subject: [PATCH] fix handling ServerCommand #316 --- src/server/srv.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/server/srv.rs b/src/server/srv.rs index 6bb64ee2e..c5aca7570 100644 --- a/src/server/srv.rs +++ b/src/server/srv.rs @@ -4,7 +4,7 @@ use std::time::Duration; use std::{io, net, thread}; use actix::{ - fut, signal, Actor, ActorContext, ActorFuture, Addr, Arbiter, AsyncContext, Context, + fut, signal, Actor, ActorFuture, Addr, Arbiter, AsyncContext, Context, ContextFutureSpawner, Handler, Response, StreamHandler, System, WrapFuture, }; @@ -617,9 +617,7 @@ impl Handler for HttpServer { /// Commands from accept threads impl StreamHandler for HttpServer { - fn handle( - &mut self, msg: Result, ()>, ctx: &mut Context, - ) { + fn handle(&mut self, msg: Result, ()>, _: &mut Context) { match msg { Ok(Some(ServerCommand::WorkerDied(idx, socks))) => { let mut found = false; @@ -667,7 +665,7 @@ impl StreamHandler for HttpServer { self.workers.push((new_idx, addr)); } } - _ => ctx.stop(), + _ => (), } } }