[Fix] Use try-finally

master
sta 9 years ago
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…
Cancel
Save