1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-26 03:49:56 +08:00

Cancel underlying web request on local cancellation of lookup request

This commit is contained in:
Dean Herbert
2025-09-01 17:58:41 +09:00
Unverified
parent 0021434a62
commit 9d0043d03b
@@ -43,6 +43,8 @@ namespace osu.Game.Screens.SelectV2
var request = new GetBeatmapSetRequest(id);
var tcs = new TaskCompletionSource<APIBeatmapSet?>();
token.Register(() => request.Cancel());
// async request success callback is a bit of a dangerous game, but there's some reasoning for it.
// - don't really want to use `IAPIAccess.PerformAsync()` because we still want to respect request queueing & online status checks
// - we want the realm write here to be async because it is known to be slow for some users with large beatmap collections