[Modify] Polish it

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

View File

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