Skip to content

Commit

Permalink
fix: Replace SetResult with TrySetResult on client ready event fo…
Browse files Browse the repository at this point in the history
…r TaskCompletionSource
angelobreuer committed Jan 23, 2024
1 parent 398a8ae commit 7fc2c31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lavalink4NET.DSharpPlus/DiscordClientWrapper.cs
Original file line number Diff line number Diff line change
@@ -192,7 +192,7 @@ private Task OnClientReady(DiscordClient discordClient, ReadyEventArgs eventArgs
CurrentUserId: discordClient.CurrentUser.Id,
ShardCount: discordClient.ShardCount);

_readyTaskCompletionSource.SetResult(clientInformation);
_readyTaskCompletionSource.TrySetResult(clientInformation);
return Task.CompletedTask;
}

0 comments on commit 7fc2c31

Please sign in to comment.