mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 16:06:15 +00:00
Update UnsubscribeAll in socket client to also unsubscribe on a dedicated connection
This commit is contained in:
parent
ac295de9f6
commit
8def7f32af
@ -671,8 +671,11 @@ namespace CryptoExchange.Net.Clients
|
|||||||
var tasks = new List<Task>();
|
var tasks = new List<Task>();
|
||||||
{
|
{
|
||||||
var socketList = socketConnections.Values;
|
var socketList = socketConnections.Values;
|
||||||
foreach (var connection in socketList.Where(s => !s.DedicatedRequestConnection.IsDedicatedRequestConnection))
|
foreach (var connection in socketList)
|
||||||
tasks.Add(connection.CloseAsync());
|
{
|
||||||
|
foreach(var subscription in connection.Subscriptions.Where(x => x.UserSubscription))
|
||||||
|
tasks.Add(connection.CloseAsync(subscription));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await Task.WhenAll(tasks.ToArray()).ConfigureAwait(false);
|
await Task.WhenAll(tasks.ToArray()).ConfigureAwait(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user