Skip to content

Commit

Permalink
Adjust our status locking.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tkael committed Jun 22, 2024
1 parent f67e2a7 commit 6d953d1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions EddiStatusService/StatusService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,18 +330,16 @@ private void handleStatus(Status thisStatus)
{
return;
}

lock ( statusLock )
if ( CurrentStatus != thisStatus )
{
if ( CurrentStatus != thisStatus )
lock ( statusLock )
{
// Save our last status for reference and update our current status
LastStatus = CurrentStatus;
CurrentStatus = thisStatus;

// Pass the change in status to all subscribed processes
OnStatus( StatusChanged, CurrentStatus );
}
// Pass the change in status to all subscribed processes
OnStatus( StatusChanged, CurrentStatus );
}
}

Expand Down

0 comments on commit 6d953d1

Please sign in to comment.