From 0af9d747131d58020941b669a3876557b802855c Mon Sep 17 00:00:00 2001 From: Romazes Date: Tue, 27 Feb 2024 15:21:47 +0200 Subject: [PATCH] revert: IsConnected handle connection --- QuantConnect.CoinAPI/CoinApiDataProvider.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/QuantConnect.CoinAPI/CoinApiDataProvider.cs b/QuantConnect.CoinAPI/CoinApiDataProvider.cs index 2a87e11..2791b13 100644 --- a/QuantConnect.CoinAPI/CoinApiDataProvider.cs +++ b/QuantConnect.CoinAPI/CoinApiDataProvider.cs @@ -217,7 +217,7 @@ private bool Unsubscribe(IEnumerable symbols) /// Returns whether the data provider is connected /// /// true if the data provider is connected - public bool IsConnected { get; private set; } + public bool IsConnected => true; /// /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. @@ -361,13 +361,6 @@ private void SendHelloMessage(IEnumerable subscribeFilter) subscribe_filter_symbol_id = list.ToArray() }); - if (!IsConnected && !_client.ConnectedEvent.WaitOne(TimeSpan.FromSeconds(30))) - { - throw new Exception("Not connected..."); - } - - IsConnected = true; - _nextHelloMessageUtcTime = DateTime.UtcNow.Add(_minimumTimeBetweenHelloMessages); } @@ -449,7 +442,6 @@ private Symbol GetSymbolUsingCache(string ticker) private void OnError(object? sender, Exception e) { - IsConnected = false; Log.Error(e); }