From bf8507c7b92dad894becf3d4eb41443cdff9ee5e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 18 Nov 2021 23:26:45 +0900 Subject: [PATCH] Only apply default timeout when debugger not attached --- osu.Game/Beatmaps/WorkingBeatmap.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/WorkingBeatmap.cs b/osu.Game/Beatmaps/WorkingBeatmap.cs index f46cd405b5..d2912229c6 100644 --- a/osu.Game/Beatmaps/WorkingBeatmap.cs +++ b/osu.Game/Beatmaps/WorkingBeatmap.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using System.Threading; @@ -80,7 +81,10 @@ namespace osu.Game.Beatmaps public virtual IBeatmap GetPlayableBeatmap(IRulesetInfo ruleset, IReadOnlyList mods = null, CancellationToken? cancellationToken = null) { - var token = cancellationToken ?? new CancellationTokenSource(10000).Token; + var token = cancellationToken ?? + // don't apply the default timeout when debugger is attached (may be breakpointing / debugging). + (Debugger.IsAttached ? new CancellationToken() : new CancellationTokenSource(10000).Token); + mods ??= Array.Empty(); var rulesetInstance = ruleset.CreateInstance();