1
0
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:
Dean Herbert 2017-02-07 20:28:50 +09:00
parent f060eb07dd
commit 5757f844bf
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -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;
} }