[Modify] Polish it

This commit is contained in:
sta 2021-08-28 21:06:51 +09:00
parent 04308645b5
commit 911d58872d

View File

@ -870,16 +870,6 @@ namespace WebSocketSharp.Server
private void start (ServerSslConfiguration sslConfig)
{
if (_state == ServerState.Start) {
_log.Info ("The server has already started.");
return;
}
if (_state == ServerState.ShuttingDown) {
_log.Warn ("The server is shutting down.");
return;
}
lock (_sync) {
if (_state == ServerState.Start) {
_log.Info ("The server has already started.");
@ -1292,6 +1282,18 @@ namespace WebSocketSharp.Server
/// </exception>
public void Start ()
{
if (_state == ServerState.Start) {
_log.Info ("The server has already started.");
return;
}
if (_state == ServerState.ShuttingDown) {
_log.Warn ("The server is shutting down.");
return;
}
ServerSslConfiguration sslConfig = null;
if (_secure) {