1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-07 07:56:12 +00:00

Fixed websocket ping timeout not recognized for warning logging

This commit is contained in:
Jkorf 2025-02-26 10:44:57 +01:00
parent b13cff5a95
commit 1f9e2b4fcb

View File

@ -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