From 1f9e2b4fcbd4bcc0b83701ca6b1cd7e326c3ba27 Mon Sep 17 00:00:00 2001 From: Jkorf Date: Wed, 26 Feb 2025 10:44:57 +0100 Subject: [PATCH] Fixed websocket ping timeout not recognized for warning logging --- CryptoExchange.Net/Sockets/CryptoExchangeWebSocketClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CryptoExchange.Net/Sockets/CryptoExchangeWebSocketClient.cs b/CryptoExchange.Net/Sockets/CryptoExchangeWebSocketClient.cs index d1b8107..37cd625 100644 --- a/CryptoExchange.Net/Sockets/CryptoExchangeWebSocketClient.cs +++ b/CryptoExchange.Net/Sockets/CryptoExchangeWebSocketClient.cs @@ -592,7 +592,7 @@ namespace CryptoExchange.Net.Sockets } catch (OperationCanceledException ex) { - if (ex.InnerException?.InnerException?.Message.Equals("The WebSocket didn't receive a Pong frame in response to a Ping frame within the configured KeepAliveTimeout.") == true) + if (ex.InnerException?.InnerException?.Message.Contains("KeepAliveTimeout") == true) { // Specific case that the websocket connection got closed because of a ping frame timeout // Unfortunately doesn't seem to be a nicer way to catch