diff --git a/src/client/DCSInsight/App.config b/src/client/DCSInsight/App.config index 11e2f1d..ca31740 100644 --- a/src/client/DCSInsight/App.config +++ b/src/client/DCSInsight/App.config @@ -22,6 +22,12 @@ -1 + + False + + + True + \ No newline at end of file diff --git a/src/client/DCSInsight/Communication/TCPClientHandler.cs b/src/client/DCSInsight/Communication/TCPClientHandler.cs index cce29d1..34d8bc0 100644 --- a/src/client/DCSInsight/Communication/TCPClientHandler.cs +++ b/src/client/DCSInsight/Communication/TCPClientHandler.cs @@ -30,11 +30,13 @@ internal class TCPClientHandler : IDisposable, ICommandListener public bool LogJSON { get; set; } private string _currentMessage = ""; private volatile bool _responseReceived; + private bool _requestAPIList; - public TCPClientHandler(string host, string port) + public TCPClientHandler(string host, string port, bool requestAPIList) { _host = host; _port = port; + _requestAPIList = requestAPIList; ICEventHandler.AttachCommandListener(this); } @@ -75,7 +77,7 @@ private async void ClientThread() if (!_tcpClient.Connected) break; - if (!_apiListReceived && _metaDataPollCounter < 1) + if (_requestAPIList && !_apiListReceived && _metaDataPollCounter < 1) { Thread.Sleep(300); _metaDataPollCounter++; diff --git a/src/client/DCSInsight/MainWindow.xaml b/src/client/DCSInsight/MainWindow.xaml index 4195a94..d0f5ce0 100644 --- a/src/client/DCSInsight/MainWindow.xaml +++ b/src/client/DCSInsight/MainWindow.xaml @@ -26,7 +26,7 @@ - +