From 5245fe103cd3f74fbe1e716b59efecc11b24b79e Mon Sep 17 00:00:00 2001 From: Fedotov Anton Date: Thu, 2 Dec 2021 22:58:44 +0300 Subject: [PATCH] increase timeout after connection for getting info about routes --- client/protocols/ikev2_vpn_protocol.cpp | 2 +- client/protocols/openvpnprotocol.cpp | 2 +- client/protocols/wireguardprotocol.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/protocols/ikev2_vpn_protocol.cpp b/client/protocols/ikev2_vpn_protocol.cpp index bb89be85..eb9e559d 100644 --- a/client/protocols/ikev2_vpn_protocol.cpp +++ b/client/protocols/ikev2_vpn_protocol.cpp @@ -170,7 +170,7 @@ void Ikev2Protocol::newConnectionStateEventReceived(UINT unMsg, tagRASCONNSTATE //SetEvent(gEvent_handle); { //get the network settings of adapters - std::this_thread::sleep_for(std::chrono::seconds(3)); + std::this_thread::sleep_for(std::chrono::seconds(4)); std::string p1,p2,p3; const auto ret = adpInfo.get_adapter_info(tunnelName().toStdString()); if (std::get<0>(ret) == false){ diff --git a/client/protocols/openvpnprotocol.cpp b/client/protocols/openvpnprotocol.cpp index 45f307f1..05c870fe 100644 --- a/client/protocols/openvpnprotocol.cpp +++ b/client/protocols/openvpnprotocol.cpp @@ -250,7 +250,7 @@ void OpenVpnProtocol::onReadyReadDataFromManagementServer() stopTimeoutTimer(); setConnectionState(VpnProtocol::Connected); { - std::this_thread::sleep_for(std::chrono::seconds(3)); + std::this_thread::sleep_for(std::chrono::seconds(4)); std::string p1,p2,p3; const auto &ret = adpInfo.get_adapter_info("TAP-Windows Adapter V9"); if (std::get<0>(ret) == false){ diff --git a/client/protocols/wireguardprotocol.cpp b/client/protocols/wireguardprotocol.cpp index c256c31e..136fd027 100644 --- a/client/protocols/wireguardprotocol.cpp +++ b/client/protocols/wireguardprotocol.cpp @@ -174,7 +174,7 @@ ErrorCode WireguardProtocol::start() setConnectionState(ConnectionState::Connected); { //TODO:FIXME: without some ugly sleep we have't get a adapter parametrs - std::this_thread::sleep_for(std::chrono::seconds(3)); + std::this_thread::sleep_for(std::chrono::seconds(4)); std::string p1{},p2{};//,p3; const auto &ret = adpInfo.get_adapter_info("WireGuard Tunnel");//serviceName().toStdString());//("AmneziaVPN IKEv2"); if (std::get<0>(ret) == false){