From e01651a48c2797bcf12df67c01b95402086ce070 Mon Sep 17 00:00:00 2001 From: Angelo Breuer <46497296+angelobreuer@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:52:00 +0200 Subject: [PATCH] Update LavalinkSocket.cs Signed-off-by: Angelo Breuer <46497296+angelobreuer@users.noreply.github.com> --- src/Lavalink4NET/Socket/LavalinkSocket.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Lavalink4NET/Socket/LavalinkSocket.cs b/src/Lavalink4NET/Socket/LavalinkSocket.cs index 114c5a42..c6ae46bd 100644 --- a/src/Lavalink4NET/Socket/LavalinkSocket.cs +++ b/src/Lavalink4NET/Socket/LavalinkSocket.cs @@ -217,6 +217,10 @@ private async Task ReceiveInternalAsync(WebSocket webSocket, Memory receiv await ProcessAsync(buffer, cancellationToken).ConfigureAwait(false); } } + catch (OperationCanceledException) + { + // Ignore + } catch (Exception exception) { _logger.CommunicationError(Label, exception); @@ -314,4 +318,4 @@ internal static partial class Logging [LoggerMessage(6, LogLevel.Warning, "[{Label}] An error occurred while dispatching the ConnectionClosed event.", EventName = nameof(ErrorConnectionClosedEvent))] public static partial void ErrorConnectionClosedEvent(this ILogger logger, string label, Exception exception); -} \ No newline at end of file +}