From 88beee2d1fad2db1c30acc39d8cb6e50a7a9d4f7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 22 Jan 2018 13:17:03 +0900 Subject: [PATCH] Keep downloads active until their associated import operation finishes This avoids race conditions where a second download can potentially be started while the first is still active. --- osu.Game/Beatmaps/BeatmapManager.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index 634b5bcd20..e6ddf4bfd9 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -287,9 +287,8 @@ namespace osu.Game.Beatmaps Import(archive); downloadNotification.State = ProgressNotificationState.Completed; + currentDownloads.Remove(request); }, TaskCreationOptions.LongRunning); - - currentDownloads.Remove(request); }; request.Failure += data =>