mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:22:55 +08:00
Don't clear username on logout
This commit is contained in:
parent
0757beb3b8
commit
30dbc36fce
@ -161,7 +161,7 @@ namespace osu.Game.Online.API
|
||||
//hard bail if we can't get a valid access token.
|
||||
if (authentication.RequestAccessToken() == null)
|
||||
{
|
||||
Logout(false);
|
||||
Logout();
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -293,7 +293,7 @@ namespace osu.Game.Online.API
|
||||
switch (statusCode)
|
||||
{
|
||||
case HttpStatusCode.Unauthorized:
|
||||
Logout(false);
|
||||
Logout();
|
||||
return true;
|
||||
case HttpStatusCode.RequestTimeout:
|
||||
failureCount++;
|
||||
@ -342,10 +342,9 @@ namespace osu.Game.Online.API
|
||||
}
|
||||
}
|
||||
|
||||
public void Logout(bool clearUsername = true)
|
||||
public void Logout()
|
||||
{
|
||||
flushQueue();
|
||||
if (clearUsername) ProvidedUsername = null;
|
||||
password = null;
|
||||
authentication.Clear();
|
||||
LocalUser.Value = createGuestUser();
|
||||
|
Loading…
Reference in New Issue
Block a user