From 8607c51bcf97db266aebc3d6f5adc5e986858094 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Thu, 15 Feb 2018 22:02:03 -0800 Subject: [PATCH] do not stop accept thread on error --- src/server/srv.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/srv.rs b/src/server/srv.rs index 3b828a1c5..4f1d5c206 100644 --- a/src/server/srv.rs +++ b/src/server/srv.rs @@ -628,11 +628,11 @@ fn start_accept_thread(sock: net::TcpListener, addr: net::SocketAddr, backlog: i .expect("worker thread died"); next = (next + 1) % workers.len(); }, - Err(err) => if err.kind() == io::ErrorKind::WouldBlock { + Err(err) => { + if err.kind() != io::ErrorKind::WouldBlock { + error!("Error accepting connection: {:?}", err); + } break - } else { - error!("Error accepting connection: {:?}", err); - return } } }