[Modify] Polish it
This commit is contained in:
parent
3f3bbb39b3
commit
a79b966144
@ -1334,23 +1334,8 @@ namespace WebSocketSharp.Server
|
||||
/// </remarks>
|
||||
public void Stop ()
|
||||
{
|
||||
if (_state == ServerState.Ready) {
|
||||
_log.Info ("The server is not started.");
|
||||
|
||||
if (_state != ServerState.Start)
|
||||
return;
|
||||
}
|
||||
|
||||
if (_state == ServerState.ShuttingDown) {
|
||||
_log.Info ("The server is shutting down.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (_state == ServerState.Stop) {
|
||||
_log.Info ("The server has already stopped.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
stop (1001, String.Empty);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user