[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) 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) { lock (_sync) {
if (_state == ServerState.Start) { if (_state == ServerState.Start) {
_log.Info ("The server has already started."); _log.Info ("The server has already started.");
@ -1292,6 +1282,18 @@ namespace WebSocketSharp.Server
/// </exception> /// </exception>
public void Start () 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; ServerSslConfiguration sslConfig = null;
if (_secure) { if (_secure) {