[Modify] Polish it

This commit is contained in:
sta 2021-12-25 23:02:29 +09:00
parent 50ae677b2d
commit b0e6795658

View File

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