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