mirror of
https://github.com/ppy/osu.git
synced 2025-03-14 05:07:26 +08:00
Merge pull request #25029 from peppy/socket-exception-handling
Fix OAuth refresh attempt when no network available causing full logout (part 2)
This commit is contained in:
commit
250b9112c4
@ -6,6 +6,7 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Net.Http;
|
||||
using System.Net.Sockets;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.Bindables;
|
||||
|
||||
@ -99,6 +100,11 @@ namespace osu.Game.Online.API
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (SocketException)
|
||||
{
|
||||
// Network failure.
|
||||
return false;
|
||||
}
|
||||
catch (HttpRequestException)
|
||||
{
|
||||
// Network failure.
|
||||
@ -106,7 +112,7 @@ namespace osu.Game.Online.API
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Force a full re-reauthentication.
|
||||
// Force a full re-authentication.
|
||||
Token.Value = null;
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user