[Modify] Polish it

This commit is contained in:
sta 2021-06-29 19:39:18 +09:00
parent c095eb38c4
commit 6620690afe

View File

@ -993,22 +993,26 @@ namespace WebSocketSharp.Server
{ {
if (_state == ServerState.Start) { if (_state == ServerState.Start) {
_log.Info ("The server has already started."); _log.Info ("The server has already started.");
return; return;
} }
if (_state == ServerState.ShuttingDown) { if (_state == ServerState.ShuttingDown) {
_log.Warn ("The server is shutting down."); _log.Warn ("The server is shutting down.");
return; return;
} }
lock (_sync) { lock (_sync) {
if (_state == ServerState.Start) { if (_state == ServerState.Start) {
_log.Info ("The server has already started."); _log.Info ("The server has already started.");
return; return;
} }
if (_state == ServerState.ShuttingDown) { if (_state == ServerState.ShuttingDown) {
_log.Warn ("The server is shutting down."); _log.Warn ("The server is shutting down.");
return; return;
} }