From ecc8267b59b86173f34d172da6de6c12c8918d6e 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 58306c19382e..1f26ab5458cc 100644 --- a/osu.Game/Online/API/OAuth.cs +++ b/osu.Game/Online/API/OAuth.cs @@ -99,9 +99,14 @@ internal bool AuthenticateWithRefresh(string refresh) 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; }