Crash on exit fix for Windows
This commit is contained in:
parent
70e6a3d303
commit
6f392ce126
3 changed files with 1 additions and 20 deletions
|
@ -101,8 +101,6 @@ void WireguardProtocol::stop()
|
|||
#if defined(Q_OS_MAC) || defined(Q_OS_WIN) || defined(Q_OS_LINUX)
|
||||
ErrorCode WireguardProtocol::startMzImpl()
|
||||
{
|
||||
|
||||
qDebug() << "WireguardProtocol::startMzImpl():" << m_rawConfig;
|
||||
m_impl->activate(m_rawConfig);
|
||||
return ErrorCode::NoError;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -19,7 +19,7 @@ public:
|
|||
const QSharedPointer<ContainersModel> &containersModel,
|
||||
const QSharedPointer<VpnConnection> &vpnConnection, QObject *parent = nullptr);
|
||||
|
||||
~ConnectionController();
|
||||
~ConnectionController() = default;
|
||||
|
||||
bool isConnected() const;
|
||||
bool isConnectionInProgress() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue