1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-21 13:23:07 +00:00

Increased receive buffer, added symbol order book check

This commit is contained in:
Jkorf
2021-09-29 16:27:27 +02:00
parent a24c7e008f
commit 07e2a98685
3 changed files with 4 additions and 146 deletions
@@ -234,6 +234,9 @@ namespace CryptoExchange.Net.OrderBook
/// <returns></returns>
public async Task<CallResult<bool>> StartAsync()
{
if (Status != OrderBookStatus.Disconnected)
throw new InvalidOperationException($"Can't start book unless state is {OrderBookStatus.Connecting}. Was {Status}");
log.Write(LogLevel.Debug, $"{Id} order book {Symbol} starting");
Status = OrderBookStatus.Connecting;
_processTask = Task.Factory.StartNew(ProcessQueue, TaskCreationOptions.LongRunning);