[Modify] Polish it
This commit is contained in:
parent
6b8b0ba745
commit
5faf02fd11
@ -994,18 +994,6 @@ namespace WebSocketSharp.Server
|
||||
|
||||
private 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;
|
||||
}
|
||||
|
||||
lock (_sync) {
|
||||
if (_state == ServerState.Start) {
|
||||
_log.Info ("The server has already started.");
|
||||
@ -1451,6 +1439,18 @@ namespace WebSocketSharp.Server
|
||||
throw new InvalidOperationException (msg);
|
||||
}
|
||||
|
||||
if (_state == ServerState.Start) {
|
||||
_log.Info ("The server has already started.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (_state == ServerState.ShuttingDown) {
|
||||
_log.Warn ("The server is shutting down.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
start ();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user