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

Fix for HandleUpdatesBeforeConfirmation if set on subscription itself

This commit is contained in:
JKorf 2024-03-20 12:03:19 +01:00
parent 87f5e12b60
commit 926802d953
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ namespace CryptoExchange.Net.Clients
return socketResult.As<UpdateSubscription>(null); return socketResult.As<UpdateSubscription>(null);
socketConnection = socketResult.Data; socketConnection = socketResult.Data;
subscription.HandleUpdatesBeforeConfirmation = HandleMessageBeforeConfirmation; subscription.HandleUpdatesBeforeConfirmation = subscription.HandleUpdatesBeforeConfirmation || HandleMessageBeforeConfirmation;
// Add a subscription on the socket connection // Add a subscription on the socket connection
var success = socketConnection.AddSubscription(subscription); var success = socketConnection.AddSubscription(subscription);

View File

@ -406,7 +406,7 @@ namespace CryptoExchange.Net.Sockets
{ {
List<string> listenerIds; List<string> listenerIds;
lock (_listenersLock) lock (_listenersLock)
listenerIds = _listeners.SelectMany(l => l.ListenerIdentifiers).ToList(); listenerIds = _listeners.Where(l => l.CanHandleData).SelectMany(l => l.ListenerIdentifiers).ToList();
_logger.LogWarning("[Sckt {SocketId}] received message not matched to any listener. ListenId: {ListenId}, current listeners: {ListenIds}", SocketId, listenId, listenerIds); _logger.LogWarning("[Sckt {SocketId}] received message not matched to any listener. ListenId: {ListenId}, current listeners: {ListenIds}", SocketId, listenId, listenerIds);
UnhandledMessage?.Invoke(_accessor); UnhandledMessage?.Invoke(_accessor);
} }