[Modify] Polish it

This commit is contained in:
sta 2021-07-02 20:38:58 +09:00
parent 6c12b638fd
commit 34868bed04

View File

@ -1052,27 +1052,32 @@ namespace WebSocketSharp.Server
{ {
if (_state == ServerState.Ready) { if (_state == ServerState.Ready) {
_log.Info ("The server is not started."); _log.Info ("The server is not started.");
return; return;
} }
if (_state == ServerState.ShuttingDown) { if (_state == ServerState.ShuttingDown) {
_log.Info ("The server is shutting down."); _log.Info ("The server is shutting down.");
return; return;
} }
if (_state == ServerState.Stop) { if (_state == ServerState.Stop) {
_log.Info ("The server has already stopped."); _log.Info ("The server has already stopped.");
return; return;
} }
lock (_sync) { lock (_sync) {
if (_state == ServerState.ShuttingDown) { if (_state == ServerState.ShuttingDown) {
_log.Info ("The server is shutting down."); _log.Info ("The server is shutting down.");
return; return;
} }
if (_state == ServerState.Stop) { if (_state == ServerState.Stop) {
_log.Info ("The server has already stopped."); _log.Info ("The server has already stopped.");
return; return;
} }