Skip to content

Commit

Permalink
Fix: Quick ingame scene & map changes causing event data from previou…
Browse files Browse the repository at this point in the history
…s map to be incorrectly reused
  • Loading branch information
Piotrekol committed Nov 4, 2022
1 parent 8651e2b commit 8bc9417
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,13 @@ private void NewOsuEvent(object sender, IMapSearchArgs mapSearchArgs)
LegacyOsuTasks.Push(mapSearchArgs);
return;
}

//Cancel current event only if we're changing map - otherwise we'll be reusing most of that data anyway
if (mapSearchArgs.EventType == OsuEventType.MapChange)
{
_cancellationTokenSource.TryCancel();
}

_cancellationTokenSource.TryCancel();
OsuTasks.Clear();
_logger.SetContextData("Osu_event", eventData);

Expand Down

0 comments on commit 8bc9417

Please sign in to comment.