add delay for ping checker stop
This commit is contained in:
parent
681eb5aa86
commit
26994c21b1
3 changed files with 5 additions and 13 deletions
|
@ -49,9 +49,6 @@ LocalSocketController::LocalSocketController() {
|
|||
m_initializingTimer.setSingleShot(true);
|
||||
connect(&m_initializingTimer, &QTimer::timeout, this,
|
||||
&LocalSocketController::initializeInternal);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
LocalSocketController::~LocalSocketController() {
|
||||
|
@ -279,8 +276,6 @@ void LocalSocketController::deactivate() {
|
|||
QJsonObject json;
|
||||
json.insert("type", "deactivate");
|
||||
write(json);
|
||||
auto result = IpcClient::Interface()->stopNetworkCheck();
|
||||
result.waitForFinished(3000);
|
||||
emit disconnected();
|
||||
}
|
||||
|
||||
|
@ -462,9 +457,7 @@ void LocalSocketController::parseCommand(const QByteArray& command) {
|
|||
|
||||
checkStatus();
|
||||
|
||||
emit statusUpdated("",
|
||||
m_deviceIpv4, 0,
|
||||
0);
|
||||
emit statusUpdated("", m_deviceIpv4, 0, 0);
|
||||
|
||||
emit connected(pubkey.toString());
|
||||
return;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include <functional>
|
||||
|
||||
#include "controllerimpl.h"
|
||||
#include "qjsonobject.h"
|
||||
|
||||
|
||||
class QJsonObject;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <QHostInfo>
|
||||
#include <QJsonObject>
|
||||
|
||||
#include "core/controllers/serverController.h"
|
||||
#include <configurators/cloak_configurator.h>
|
||||
#include <configurators/openvpn_configurator.h>
|
||||
#include <configurators/shadowsocks_configurator.h>
|
||||
|
@ -14,7 +13,6 @@
|
|||
|
||||
#ifdef AMNEZIA_DESKTOP
|
||||
#include "core/ipcclient.h"
|
||||
#include "ipc.h"
|
||||
#include <protocols/wireguardprotocol.h>
|
||||
#endif
|
||||
|
||||
|
@ -91,7 +89,8 @@ void VpnConnection::onConnectionStateChanged(Vpn::ConnectionState state)
|
|||
|
||||
} else if (state == Vpn::ConnectionState::Error) {
|
||||
IpcClient::Interface()->flushDns();
|
||||
IpcClient::Interface()->stopNetworkCheck();
|
||||
auto result = IpcClient::Interface()->stopNetworkCheck();
|
||||
result.waitForFinished(3000);
|
||||
|
||||
if (m_settings->isSitesSplitTunnelingEnabled()) {
|
||||
if (m_settings->routeMode() == Settings::VpnOnlyForwardSites) {
|
||||
|
@ -101,7 +100,8 @@ void VpnConnection::onConnectionStateChanged(Vpn::ConnectionState state)
|
|||
} else if (state == Vpn::ConnectionState::Connecting) {
|
||||
|
||||
} else if (state == Vpn::ConnectionState::Disconnected) {
|
||||
IpcClient::Interface()->stopNetworkCheck();
|
||||
auto result = IpcClient::Interface()->stopNetworkCheck();
|
||||
result.waitForFinished(3000);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue