[Modify] Polish it

This commit is contained in:
sta 2016-10-09 16:34:25 +09:00
parent 25c8d9d1ec
commit 4df24ba18b

View File

@ -346,8 +346,14 @@ namespace WebSocketSharp.Server
} }
set { set {
var msg = _state.CheckIfAvailable (true, false, false); string msg;
if (msg != null) { if (!checkIfAvailable (true, false, false, true, out msg)) {
_logger.Error (msg);
return;
}
lock (_sync) {
if (!checkIfAvailable (true, false, false, true, out msg)) {
_logger.Error (msg); _logger.Error (msg);
return; return;
} }
@ -355,6 +361,7 @@ namespace WebSocketSharp.Server
_authSchemes = value; _authSchemes = value;
} }
} }
}
/// <summary> /// <summary>
/// Gets a value indicating whether the server has started. /// Gets a value indicating whether the server has started.