[Modify] Polish it
This commit is contained in:
parent
c6d6d5de3b
commit
7a29844836
@ -938,13 +938,27 @@ namespace WebSocketSharp.Server
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
catch (HttpListenerException) {
|
catch (HttpListenerException ex) {
|
||||||
_log.Info ("The underlying listener is stopped.");
|
if (_state == ServerState.ShuttingDown) {
|
||||||
|
_log.Info ("The underlying listener is stopped.");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_log.Fatal (ex.Message);
|
||||||
|
_log.Debug (ex.ToString ());
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
catch (InvalidOperationException) {
|
catch (InvalidOperationException ex) {
|
||||||
_log.Info ("The underlying listener is stopped.");
|
if (_state == ServerState.ShuttingDown) {
|
||||||
|
_log.Info ("The underlying listener is stopped.");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_log.Fatal (ex.Message);
|
||||||
|
_log.Debug (ex.ToString ());
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -955,13 +969,13 @@ namespace WebSocketSharp.Server
|
|||||||
if (ctx != null)
|
if (ctx != null)
|
||||||
ctx.Connection.Close (true);
|
ctx.Connection.Close (true);
|
||||||
|
|
||||||
|
if (_state == ServerState.ShuttingDown)
|
||||||
|
return;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_state == ServerState.ShuttingDown)
|
|
||||||
return;
|
|
||||||
|
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user