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 +}