1
0
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:
Jkorf 2026-01-20 15:19:42 +01:00
parent bc8faf9822
commit 96b3904266
2 changed files with 10 additions and 0 deletions

View File

@ -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
{ {

View File

@ -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);