From f4eb0c4cd6cbfe4bea3c4ce2935eb7deeeac2928 Mon Sep 17 00:00:00 2001 From: SKProCH Date: Sat, 31 Aug 2024 00:24:16 +0300 Subject: [PATCH] Make awaiting node connection for sending player events in fire and forget manner. Fixes the https://github.com/angelobreuer/Lavalink4NET/issues/173 --- src/Lavalink4NET/Players/LavalinkPlayerHandle.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Lavalink4NET/Players/LavalinkPlayerHandle.cs b/src/Lavalink4NET/Players/LavalinkPlayerHandle.cs index 423f00e6..bbbf1047 100644 --- a/src/Lavalink4NET/Players/LavalinkPlayerHandle.cs +++ b/src/Lavalink4NET/Players/LavalinkPlayerHandle.cs @@ -100,7 +100,7 @@ public async ValueTask UpdateVoiceServerAsync(VoiceServer voiceServer, Cancellat if (_voiceState is not null) { - await CompleteAsync(isVoiceServerUpdated: true, cancellationToken).ConfigureAwait(false); + _ = CompleteAsync(isVoiceServerUpdated: true, cancellationToken).Preserve(); } } @@ -118,7 +118,7 @@ public async ValueTask UpdateVoiceStateAsync(VoiceState voiceState, Cancellation if (_voiceServer is not null) { - await CompleteAsync(isVoiceServerUpdated: false, cancellationToken).ConfigureAwait(false); + _ = CompleteAsync(isVoiceServerUpdated: false, cancellationToken).Preserve(); } }