From 473cf76f1bdf0704234412ab4fb8ade869efa730 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 4 Jul 2017 14:40:03 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Server/HttpServer.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/websocket-sharp/Server/HttpServer.cs b/websocket-sharp/Server/HttpServer.cs index f8ef3e9b..98280480 100644 --- a/websocket-sharp/Server/HttpServer.cs +++ b/websocket-sharp/Server/HttpServer.cs @@ -944,15 +944,12 @@ namespace WebSocketSharp.Server } ); } - catch (HttpListenerException ex) { - if (_state == ServerState.ShuttingDown) { - _log.Info ("The receiving is stopped."); - break; - } - - _log.Fatal (ex.Message); - _log.Debug (ex.ToString ()); - + catch (HttpListenerException) { + _log.Info ("The underlying listener is stopped."); + break; + } + catch (InvalidOperationException) { + _log.Info ("The underlying listener is stopped."); break; } catch (Exception ex) {