[Fix] Use try-finally
This commit is contained in:
parent
4f3f165fc0
commit
262922f049
@ -904,10 +904,17 @@ namespace WebSocketSharp.Server
|
|||||||
_state = ServerState.ShuttingDown;
|
_state = ServerState.ShuttingDown;
|
||||||
}
|
}
|
||||||
|
|
||||||
stopReceiving (5000);
|
try {
|
||||||
_services.Stop (code, reason);
|
try {
|
||||||
|
stopReceiving (5000);
|
||||||
_state = ServerState.Stop;
|
}
|
||||||
|
finally {
|
||||||
|
_services.Stop (code, reason);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
_state = ServerState.Stop;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopReceiving (int millisecondsTimeout)
|
private void stopReceiving (int millisecondsTimeout)
|
||||||
|
Loading…
Reference in New Issue
Block a user