Prevent throwing exceptions on first run without internet

This commit is contained in:
Dan Balasescu 2022-05-09 12:15:54 +09:00
parent 45c6f5edef
commit 3b4fdf20f9

View File

@ -153,7 +153,17 @@ namespace osu.Game.Beatmaps
}
};
Task.Run(() => cacheDownloadRequest.PerformAsync());
Task.Run(async () =>
{
try
{
await cacheDownloadRequest.PerformAsync();
}
catch
{
// Prevent throwing unobserved exceptions, as they will be logged from the network request to the log file anyway.
}
});
}
private bool checkLocalCache(BeatmapSetInfo set, BeatmapInfo beatmapInfo)