mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:42:56 +08:00
Fix a potential crash due to API being too eager to declare online state.
This commit is contained in:
parent
f060eb07dd
commit
5757f844bf
@ -133,16 +133,16 @@ namespace osu.Game.Online.API
|
|||||||
var userReq = new GetUserRequest();
|
var userReq = new GetUserRequest();
|
||||||
userReq.Success += (u) => {
|
userReq.Success += (u) => {
|
||||||
LocalUser.Value = u;
|
LocalUser.Value = u;
|
||||||
|
//we're connected!
|
||||||
|
State = APIState.Online;
|
||||||
|
failureCount = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!handleRequest(userReq))
|
if (!handleRequest(userReq))
|
||||||
{
|
{
|
||||||
State = APIState.Failing;
|
State = APIState.Failing;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//we're connected!
|
|
||||||
State = APIState.Online;
|
|
||||||
failureCount = 0;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user