1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 08:52:55 +08:00

Merge pull request #3921 from smoogipoo/fix-webrequest-cancellation

Fix cancelling completed webrequests throwing exceptions
This commit is contained in:
Dean Herbert 2018-12-26 22:17:01 +09:00 committed by GitHub
commit a2885a99cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,11 @@ namespace osu.Game.Online.API
public void Fail(Exception e)
{
if (cancelled) return;
if (WebRequest?.Completed == true)
return;
if (cancelled)
return;
cancelled = true;
WebRequest?.Abort();