Skip to content

Commit

Permalink
Prevent potential threading issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed Mar 19, 2024
1 parent f851716 commit 808d6e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion osu.Desktop/DiscordRichPresence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ private void load(OsuConfigManager config)
private void onReady(object _, ReadyMessage __)
{
Logger.Log("Discord RPC Client ready.", LoggingTarget.Network, LogLevel.Debug);
updateStatus();
Schedule(updateStatus);
}

private void updateStatus()
{
Debug.Assert(ThreadSafety.IsUpdateThread);

if (!client.IsInitialized)
return;

Expand Down

0 comments on commit 808d6e0

Please sign in to comment.