Crash on exit fix for Windows

This commit is contained in:
pokamest 2023-10-04 16:09:03 +01:00
parent 70e6a3d303
commit 6f392ce126
3 changed files with 1 additions and 20 deletions

View file

@ -21,23 +21,6 @@ ConnectionController::ConnectionController(const QSharedPointer<ServersModel> &s
Qt::QueuedConnection);
}
ConnectionController::~ConnectionController()
{
// todo use ConnectionController instead of using m_vpnConnection directly
#ifdef AMNEZIA_DESKTOP
if (m_vpnConnection->connectionState() != Vpn::ConnectionState::Disconnected) {
m_vpnConnection->disconnectFromVpn();
for (int i = 0; i < 50; i++) {
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
QThread::msleep(100);
if (m_vpnConnection->isDisconnected()) {
break;
}
}
}
#endif
}
void ConnectionController::openConnection()
{
int serverIndex = m_serversModel->getDefaultServerIndex();