From 3c62521e69ff091b54cf9685eaa000fed1fd81ad Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 24 Sep 2023 10:50:07 +0900 Subject: [PATCH] Fix OAuth refresh attempt when no network available causing full logout --- osu.Game/Online/API/OAuth.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osu.Game/Online/API/OAuth.cs b/osu.Game/Online/API/OAuth.cs index 58306c1938..1f26ab5458 100644 --- a/osu.Game/Online/API/OAuth.cs +++ b/osu.Game/Online/API/OAuth.cs @@ -99,9 +99,14 @@ namespace osu.Game.Online.API return true; } } + catch (HttpRequestException) + { + // Network failure. + return false; + } catch { - //todo: potentially only kill the refresh token on certain exception types. + // Force a full re-reauthentication. Token.Value = null; return false; }