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

Added setting for whether or not to process unparsable websocket messages

This commit is contained in:
Jkorf 2025-07-16 10:42:38 +02:00
parent aa06e0eead
commit 0152603ddb
2 changed files with 6 additions and 3 deletions

View File

@ -82,6 +82,11 @@ namespace CryptoExchange.Net.Clients
/// </summary>
protected bool AllowTopicsOnTheSameConnection { get; set; } = true;
/// <summary>
/// Whether to continue processing and forward unparsable messages to handlers
/// </summary>
protected internal bool ProcessUnparsableMessages { get; set; } = false;
/// <inheritdoc />
public double IncomingKbps
{

View File

@ -11,8 +11,6 @@ using System.Diagnostics;
using CryptoExchange.Net.Clients;
using CryptoExchange.Net.Logging.Extensions;
using System.Threading;
using CryptoExchange.Net.Objects.Options;
using CryptoExchange.Net.Authentication;
namespace CryptoExchange.Net.Sockets
{
@ -475,7 +473,7 @@ namespace CryptoExchange.Net.Sockets
_logger.ReceivedData(SocketId, originalData);
}
if (!accessor.IsValid)
if (!accessor.IsValid && !ApiClient.ProcessUnparsableMessages)
{
_logger.FailedToParse(SocketId, result.Error!.Message);
return;