mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 12:22:56 +08:00
Fix web requests potentially being performed after cancelled
Closes https://github.com/ppy/osu/issues/18524.
This commit is contained in:
parent
1af51a2b19
commit
eb2d822530
@ -121,8 +121,16 @@ namespace osu.Game.Online.API
|
||||
|
||||
if (isFailing) return;
|
||||
|
||||
Logger.Log($@"Performing request {this}", LoggingTarget.Network);
|
||||
WebRequest.Perform();
|
||||
try
|
||||
{
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user