mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Avoid calling api request callback after user cancel
This commit is contained in:
@ -88,7 +88,12 @@ namespace osu.Game.Online.API
|
|||||||
if (checkAndScheduleFailure())
|
if (checkAndScheduleFailure())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
API.Schedule(delegate { Success?.Invoke(); });
|
API.Schedule(delegate
|
||||||
|
{
|
||||||
|
if (cancelled) return;
|
||||||
|
|
||||||
|
Success?.Invoke();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Cancel() => Fail(new OperationCanceledException(@"Request cancelled"));
|
public void Cancel() => Fail(new OperationCanceledException(@"Request cancelled"));
|
||||||
|
Reference in New Issue
Block a user