mirror of
https://github.com/ppy/osu
synced 2024-12-12 18:07:52 +00:00
Avoid firing any kind of failures after success
This commit is contained in:
parent
f5ba746ae5
commit
ce452565f4
@ -131,8 +131,11 @@ namespace osu.Game.Online.API
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool succeeded;
|
||||||
|
|
||||||
internal virtual void TriggerSuccess()
|
internal virtual void TriggerSuccess()
|
||||||
{
|
{
|
||||||
|
succeeded = true;
|
||||||
Success?.Invoke();
|
Success?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,10 +148,7 @@ namespace osu.Game.Online.API
|
|||||||
|
|
||||||
public void Fail(Exception e)
|
public void Fail(Exception e)
|
||||||
{
|
{
|
||||||
if (WebRequest?.Completed == true)
|
if (succeeded || cancelled)
|
||||||
return;
|
|
||||||
|
|
||||||
if (cancelled)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user