Skip to content

Commit

Permalink
Fix: Cancelation of SC event not cancelling osu map processing
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrekol committed Aug 31, 2022
1 parent 87515fc commit fd7bdf0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions PpCalculator/PpCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,11 @@ private double InternalCalculate(CancellationToken cancellationToken, double? en
if (LastMods != newMods || ResetPerformanceCalculator)
{
mods = GetOsuMods(ruleset).Select(m => m.CreateInstance()).ToArray();
using var cts = new CancellationTokenSource(20_000);
using var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
cts.CancelAfter(20_000);
PlayableBeatmap = WorkingBeatmap.GetPlayableBeatmap(ruleset.RulesetInfo, mods, cts.Token);


LastMods = newMods;
ScoreInfo.Mods = mods;

createPerformanceCalculator = true;
}

Expand Down

0 comments on commit fd7bdf0

Please sign in to comment.