mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Fix remaining issues
This commit is contained in:
@ -176,6 +176,7 @@ namespace osu.Game.Online.API
|
||||
lock (queue)
|
||||
{
|
||||
if (queue.Count == 0) break;
|
||||
|
||||
req = queue.Dequeue();
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,10 @@ namespace osu.Game.Online.API
|
||||
}
|
||||
|
||||
public delegate void APIFailureHandler(Exception e);
|
||||
|
||||
public delegate void APISuccessHandler();
|
||||
|
||||
public delegate void APIProgressHandler(long current, long total);
|
||||
|
||||
public delegate void APISuccessHandler<in T>(T content);
|
||||
}
|
||||
|
@ -19,15 +19,9 @@ namespace osu.Game.Online.API
|
||||
[JsonProperty(@"expires_in")]
|
||||
public long ExpiresIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return AccessTokenExpiry - DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||
}
|
||||
get { return AccessTokenExpiry - DateTimeOffset.UtcNow.ToUnixTimeSeconds(); }
|
||||
|
||||
set
|
||||
{
|
||||
AccessTokenExpiry = DateTimeOffset.Now.AddSeconds(value).ToUnixTimeSeconds();
|
||||
}
|
||||
set { AccessTokenExpiry = DateTimeOffset.Now.AddSeconds(value).ToUnixTimeSeconds(); }
|
||||
}
|
||||
|
||||
public bool IsValid => !string.IsNullOrEmpty(AccessToken) && ExpiresIn > 30;
|
||||
@ -57,6 +51,7 @@ namespace osu.Game.Online.API
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user