[Modify] Polish it

This commit is contained in:
sta 2022-01-07 19:53:13 +09:00
parent 06edc3beae
commit 958cf8a8f3

View File

@ -769,15 +769,20 @@ namespace WebSocketSharp.Server
_state = ServerState.ShuttingDown; _state = ServerState.ShuttingDown;
} }
try {
try { try {
_services.Stop (1006, String.Empty); _services.Stop (1006, String.Empty);
} }
finally { catch (Exception ex) {
_log.Fatal (ex.Message);
_log.Debug (ex.ToString ());
}
try {
_listener.Abort (); _listener.Abort ();
} }
} catch (Exception ex) {
catch { _log.Fatal (ex.Message);
_log.Debug (ex.ToString ());
} }
_state = ServerState.Stop; _state = ServerState.Stop;