[Modify] Polish it
This commit is contained in:
parent
5b496bdc99
commit
b5d62e06cd
@ -1006,17 +1006,8 @@ namespace WebSocketSharp.Server
|
|||||||
private void stop (ushort code, string reason)
|
private void stop (ushort code, string reason)
|
||||||
{
|
{
|
||||||
lock (_sync) {
|
lock (_sync) {
|
||||||
if (_state == ServerState.ShuttingDown) {
|
if (_state != ServerState.Start)
|
||||||
_log.Info ("The server is shutting down.");
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (_state == ServerState.Stop) {
|
|
||||||
_log.Info ("The server has already stopped.");
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_state = ServerState.ShuttingDown;
|
_state = ServerState.ShuttingDown;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user