mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Fix web requests potentially being performed after cancelled
Closes https://github.com/ppy/osu/issues/18524.
This commit is contained in:
@ -121,8 +121,16 @@ namespace osu.Game.Online.API
|
|||||||
|
|
||||||
if (isFailing) return;
|
if (isFailing) return;
|
||||||
|
|
||||||
Logger.Log($@"Performing request {this}", LoggingTarget.Network);
|
try
|
||||||
WebRequest.Perform();
|
{
|
||||||
|
Logger.Log($@"Performing request {this}", LoggingTarget.Network);
|
||||||
|
WebRequest.Perform();
|
||||||
|
}
|
||||||
|
catch (OperationCanceledException)
|
||||||
|
{
|
||||||
|
// ignore this. internally Perform is running async and the fail state may have changed since
|
||||||
|
// the last check of `isFailing` above.
|
||||||
|
}
|
||||||
|
|
||||||
if (isFailing) return;
|
if (isFailing) return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user