Skip to content

Commit

Permalink
fix: Ignore destroyed player in idle inactivity tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
angelobreuer committed Aug 29, 2023
1 parent 9a9286a commit 4b52873
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ private Task PlayerStateChanged(object sender, PlayerStateChangedEventArgs event
ArgumentNullException.ThrowIfNull(sender);
ArgumentNullException.ThrowIfNull(eventArgs);

if (eventArgs.Player.State is PlayerState.Destroyed)
{
return Task.CompletedTask; // ignore, player is destroyed
}

lock (_trackerContextSyncRoot)
{
using var scope = _trackerContext.CreateScope();
Expand Down

0 comments on commit 4b52873

Please sign in to comment.