mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-07-19 16:05:47 +00:00
Added setting for whether or not to process unparsable websocket messages
This commit is contained in:
parent
aa06e0eead
commit
0152603ddb
@ -82,6 +82,11 @@ namespace CryptoExchange.Net.Clients
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected bool AllowTopicsOnTheSameConnection { get; set; } = true;
|
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 />
|
/// <inheritdoc />
|
||||||
public double IncomingKbps
|
public double IncomingKbps
|
||||||
{
|
{
|
||||||
|
@ -11,8 +11,6 @@ using System.Diagnostics;
|
|||||||
using CryptoExchange.Net.Clients;
|
using CryptoExchange.Net.Clients;
|
||||||
using CryptoExchange.Net.Logging.Extensions;
|
using CryptoExchange.Net.Logging.Extensions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using CryptoExchange.Net.Objects.Options;
|
|
||||||
using CryptoExchange.Net.Authentication;
|
|
||||||
|
|
||||||
namespace CryptoExchange.Net.Sockets
|
namespace CryptoExchange.Net.Sockets
|
||||||
{
|
{
|
||||||
@ -475,7 +473,7 @@ namespace CryptoExchange.Net.Sockets
|
|||||||
_logger.ReceivedData(SocketId, originalData);
|
_logger.ReceivedData(SocketId, originalData);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!accessor.IsValid)
|
if (!accessor.IsValid && !ApiClient.ProcessUnparsableMessages)
|
||||||
{
|
{
|
||||||
_logger.FailedToParse(SocketId, result.Error!.Message);
|
_logger.FailedToParse(SocketId, result.Error!.Message);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user