Skip to content

Commit

Permalink
revert: IsConnected handle connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Romazes committed Feb 27, 2024
1 parent 69e8e20 commit 0af9d74
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions QuantConnect.CoinAPI/CoinApiDataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ private bool Unsubscribe(IEnumerable<Symbol> symbols)
/// Returns whether the data provider is connected
/// </summary>
/// <returns>true if the data provider is connected</returns>
public bool IsConnected { get; private set; }
public bool IsConnected => true;

/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Expand Down Expand Up @@ -361,13 +361,6 @@ private void SendHelloMessage(IEnumerable<string> 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);
}

Expand Down Expand Up @@ -449,7 +442,6 @@ private Symbol GetSymbolUsingCache(string ticker)

private void OnError(object? sender, Exception e)
{
IsConnected = false;
Log.Error(e);
}

Expand Down

0 comments on commit 0af9d74

Please sign in to comment.