mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Return early to avoid updating state and failure count in fail cases
This commit is contained in:
parent
a6b7ca1a4c
commit
da8eba9996
@ -305,11 +305,13 @@ namespace osu.Game.Online.API
|
||||
{
|
||||
req.Perform(this);
|
||||
|
||||
if (req.CompletionState != APIRequestCompletionState.Completed)
|
||||
return false;
|
||||
|
||||
// we could still be in initialisation, at which point we don't want to say we're Online yet.
|
||||
if (IsLoggedIn) state.Value = APIState.Online;
|
||||
|
||||
failureCount = 0;
|
||||
return req.CompletionState == APIRequestCompletionState.Completed;
|
||||
return true;
|
||||
}
|
||||
catch (HttpRequestException re)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user