[Modify] Polish it
This commit is contained in:
parent
035b08a2c6
commit
ef33547bec
@ -1195,23 +1195,8 @@ namespace WebSocketSharp.Server
|
|||||||
/// </exception>
|
/// </exception>
|
||||||
public void Stop ()
|
public void Stop ()
|
||||||
{
|
{
|
||||||
if (_state == ServerState.Ready) {
|
if (_state != ServerState.Start)
|
||||||
_log.Info ("The server is not started.");
|
|
||||||
|
|
||||||
return;
|
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);
|
stop (1001, String.Empty);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user