mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2026-02-16 14:13:46 +00:00
Fixed state handling for subscriptions where queries do not get a response
This commit is contained in:
parent
bc8faf9822
commit
96b3904266
@ -356,6 +356,9 @@ namespace CryptoExchange.Net.Clients
|
|||||||
return new CallResult<UpdateSubscription>(subResult.Error!);
|
return new CallResult<UpdateSubscription>(subResult.Error!);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!subQuery.ExpectsResponse)
|
||||||
|
HandleSubscriptionComplete(true, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1249,6 +1249,13 @@ namespace CryptoExchange.Net.Sockets.Default
|
|||||||
};
|
};
|
||||||
|
|
||||||
taskList.Add(SendAndWaitQueryAsync(subQuery));
|
taskList.Add(SendAndWaitQueryAsync(subQuery));
|
||||||
|
|
||||||
|
if (!subQuery.ExpectsResponse)
|
||||||
|
{
|
||||||
|
// If there won't be an answer we can immediately set this
|
||||||
|
subscription.Status = SubscriptionStatus.Subscribed;
|
||||||
|
subscription.HandleSubQueryResponse(this, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await Task.WhenAll(taskList).ConfigureAwait(false);
|
await Task.WhenAll(taskList).ConfigureAwait(false);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user