Skip to content

Commit

Permalink
Now decreasing connection rate for long running sessions using autoco…
Browse files Browse the repository at this point in the history
…nnect to avoid loss of

internal SimConnect handles. After 30 minutes, an attempt is made to connect every 30 seconds, and
after one hour, every minute. Workaround for #891 which is most likely a SimConnect issue.
  • Loading branch information
albar965 committed Jun 15, 2022
1 parent 00c1c2f commit e6cb8b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ Or see [Multiple Installations](https://www.littlenavmap.org/manuals/littlenavma
* Relaxed check for valid aircraft type to match ICAO types in aircraft performance.
* More small user interface fixes and improvements.

### Other

* Now decreasing connection rate for long running sessions using autoconnect to avoid loss of
internal SimConnect handles. After 30 minutes, an attempt is made to connect every 30 seconds, and
after one hour, every minute. Workaround for #891 which is most likely a SimConnect issue.

### Build

* Moved version number to variable `VERSION_NUMBER` in file `littlenavmap.pro` instead of coding it
Expand Down
4 changes: 2 additions & 2 deletions src/connect/connectclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ atools::fs::weather::MetarResult ConnectClient::requestWeather(const QString& st
if(verbose)
qDebug() << "ConnectClient::requestWeather timed out" << station;

if((socket != nullptr && socket->isOpen()) || (dataReader->isFsxHandler() && dataReader->isConnected()))
if((socket != nullptr && socket->isOpen()) || (dataReader->isSimConnectHandler() && dataReader->isConnected()))
{
atools::fs::sc::WeatherRequest weatherRequest;
weatherRequest.setStation(station);
Expand Down Expand Up @@ -655,7 +655,7 @@ bool ConnectClient::isConnected() const

bool ConnectClient::isSimConnect() const
{
return dataReader != nullptr && dataReader->isFsxHandler();
return dataReader != nullptr && dataReader->isSimConnectHandler();
}

bool ConnectClient::isXpConnect() const
Expand Down

0 comments on commit e6cb8b3

Please sign in to comment.