[FS9] Shutdown driver if connection to FSUIPC is lost

This commit is contained in:
Roland Rossgotterer
2019-04-02 09:38:04 +02:00
committed by Mat Sutcliffe
parent ac90b3c069
commit 3e6b7b07f4

View File

@@ -315,6 +315,12 @@ namespace BlackSimPlugin
{ {
updateOwnAircraftFromSimulator(fsuipcAircraft); updateOwnAircraftFromSimulator(fsuipcAircraft);
} }
else
{
// FSUIPC read error means almost always that FS9 closed. Shutdown the driver.
CLogMessage(this).debug() << "Lost connection to FSUIPC. Shutting down.";
disconnectFrom();
}
synchronizeTime(); synchronizeTime();
} }
} }