Avoid firing any kind of failures after success

This commit is contained in:
Dean Herbert 2021-03-23 17:50:31 +09:00
parent f5ba746ae5
commit ce452565f4

View File

@ -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;