diff --git a/backend/mac/helper/firewallcontroller.cpp b/backend/mac/helper/firewallcontroller.cpp index 1ed3f0f9..bcdd2210 100644 --- a/backend/mac/helper/firewallcontroller.cpp +++ b/backend/mac/helper/firewallcontroller.cpp @@ -30,16 +30,18 @@ bool FirewallController::enable(const std::string &rules, const std::string &tab write(fd, rules.c_str(), rules.length()); close(fd); + enabled_ = true; + if (table.empty() && group.empty()) { Utils::executeCommand("/sbin/pfctl", {"-v", "-F", "all", "-f", "/etc/windscribe/pf.conf"}); Utils::executeCommand("/sbin/pfctl", {"-e"}); + updateDns(); } else if (!table.empty()) { Utils::executeCommand("/sbin/pfctl", {"-T", "load", "-f", "/etc/windscribe/pf.conf"}); } else if (!group.empty()) { Utils::executeCommand("/sbin/pfctl", {"-a", group.c_str(), "-f", "/etc/windscribe/pf.conf"}); } - enabled_ = true; return true; } @@ -69,4 +71,21 @@ bool FirewallController::enabled() Utils::executeCommand("/sbin/pfctl", {"-si"}, &output); return (output.find("Status: Enabled") != std::string::npos); -} \ No newline at end of file +} + +void FirewallController::setVpnDns(const std::string &dns) +{ + spdlog::info("Setting VPN dns: {}", dns.empty() ? "empty" : dns); + windscribeDns_ = dns; + updateDns(); +} + +void FirewallController::updateDns() +{ + if (enabled_ && !windscribeDns_.empty()) { + std::string rules = "table persist { " + windscribeDns_ + "}\n"; + enable(rules, "windscribe_dns", ""); + } else { + Utils::executeCommand("/sbin/pfctl", {"-T", "windscribe_dns", "flush"}); + } +} diff --git a/backend/mac/helper/firewallcontroller.h b/backend/mac/helper/firewallcontroller.h index dd11d036..09e2fddc 100644 --- a/backend/mac/helper/firewallcontroller.h +++ b/backend/mac/helper/firewallcontroller.h @@ -15,10 +15,13 @@ class FirewallController bool enabled(); void disable(bool keepPfEnabled = false); void getRules(const std::string &table, const std::string &group, std::string *outRules); + void setVpnDns(const std::string &dns); private: FirewallController(); ~FirewallController(); + void updateDns(); bool enabled_; + std::string windscribeDns_; }; diff --git a/backend/mac/helper/process_command.cpp b/backend/mac/helper/process_command.cpp index 80bb2da2..24aa368a 100644 --- a/backend/mac/helper/process_command.cpp +++ b/backend/mac/helper/process_command.cpp @@ -124,13 +124,7 @@ CMD_ANSWER sendConnectStatus(boost::archive::text_iarchive &ia) CMD_SEND_CONNECT_STATUS cmd; ia >> cmd; - // We need to add/remove the Connected DNS server to the firewall - if (cmd.isConnected) { - std::string pf = "table persist { " + cmd.vpnAdapter.dnsServers.front() + "}\n"; - FirewallController::instance().enable(pf, "windscribe_dns", ""); - } else { - Utils::executeCommand("pfctl", {"-T", "windscribe_dns", "flush"}); - } + FirewallController::instance().setVpnDns(cmd.isConnected ? cmd.vpnAdapter.dnsServers.front() : ""); RoutesManager::instance().setConnectStatus(cmd); answer.executed = 1; diff --git a/backend/mac/splittunnelextension/CMakeLists.txt b/backend/mac/splittunnelextension/CMakeLists.txt index fcb379c1..e3f0beb1 100644 --- a/backend/mac/splittunnelextension/CMakeLists.txt +++ b/backend/mac/splittunnelextension/CMakeLists.txt @@ -51,9 +51,3 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../provisioning_profile/splittunnelextens add_custom_command(TARGET com.windscribe.client.splittunnelextension POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/../provisioning_profile/splittunnelextension.provisionprofile" $/../embedded.provisionprofile) endif() - -# Install rules -install(TARGETS com.windscribe.client.splittunnelextension - BUNDLE DESTINATION . - COMPONENT Runtime -) diff --git a/backend/mac/splittunnelextension/Info.plist b/backend/mac/splittunnelextension/Info.plist index 5f22f964..3e4ab96a 100644 --- a/backend/mac/splittunnelextension/Info.plist +++ b/backend/mac/splittunnelextension/Info.plist @@ -15,9 +15,9 @@ CFBundlePackageType SYSX CFBundleShortVersionString - 1.0 + 1.0.1 CFBundleVersion - 1 + 1.0.1 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NetworkExtension diff --git a/backend/windows/windscribe_install_helper/CMakeLists.txt b/backend/windows/windscribe_install_helper/CMakeLists.txt index 2cec8f42..737e4ce9 100644 --- a/backend/windows/windscribe_install_helper/CMakeLists.txt +++ b/backend/windows/windscribe_install_helper/CMakeLists.txt @@ -28,6 +28,7 @@ add_compile_options("$<$:/Zi>") add_link_options("$<$:/DEBUG>" "$<$:/OPT:REF>" "$<$:/OPT:ICF>") add_executable(WindscribeInstallHelper ${SOURCES}) +set_property(TARGET WindscribeInstallHelper PROPERTY LINK_FLAGS "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\"") target_include_directories(WindscribeInstallHelper PRIVATE diff --git a/client/common/changelog.txt b/client/common/changelog.txt index 113d90c1..16aaba35 100644 --- a/client/common/changelog.txt +++ b/client/common/changelog.txt @@ -1,3 +1,20 @@ +2.14.6 (24/02/2025) +All: + * Added extended cleanup logs in wsnet. #1250 + * Improved initialization and preferences animations. #1260 + * Improved the log frequency [wsnet]. #1269 + * Fixed inconsistent behavior when starting app and 'close to tray' is enabled. #1280 + * Fixed window size after dismissing alert at the login window. #1282 +Windows: + * Fixed Windows error message box may be displayed when reinstalling deleted/disabled Windscribe service. #1266 +MacOS: + * Fixed split tunnel extension versioning. #45 + * Fixed DNS no longer allowed by firewall if toggled while connected. #1277 +Linux: + * Fixed split tunnel rule in exclusive mode. #1267 + * Fixed window size is incorrect after expanding then collapsing preferences. #1271 + + 2.14.5 (12/02/2025) All: * Fixed mangled ar/fa translations. #1268 diff --git a/client/common/utils/log/logger.cpp b/client/common/utils/log/logger.cpp index 4f92f56f..8a51ac3c 100644 --- a/client/common/utils/log/logger.cpp +++ b/client/common/utils/log/logger.cpp @@ -89,6 +89,11 @@ void Logger::myMessageHandler(QtMsgType type, const QMessageLogContext &context, } } +#ifdef Q_OS_WIN + // Uncomment this line if you want to see app output in the debugger. + //::OutputDebugString(qUtf16Printable(s + '\n')); +#endif + std::string escapedMsg = log_utils::escape_string(s.toStdString()); static const std::string fmt = "\"mod\": \"{}\", \"msg\": \"{}\""; if (type == QtDebugMsg) diff --git a/client/common/utils/log/paths.cpp b/client/common/utils/log/paths.cpp index cf97f8d7..56bb053a 100644 --- a/client/common/utils/log/paths.cpp +++ b/client/common/utils/log/paths.cpp @@ -64,7 +64,7 @@ QString paths::serviceLogLocation(bool previous) QString paths::wireguardServiceLogLocation(bool previous) { -#if defined(Q_OS_WINDOWS) +#if defined(Q_OS_WIN) return qApp->applicationDirPath() + addPreviousSuffix("/wireguard_service.log", previous); #else return ""; diff --git a/client/common/version/windscribe_version.h b/client/common/version/windscribe_version.h index 1a87ba55..4fbd4f85 100644 --- a/client/common/version/windscribe_version.h +++ b/client/common/version/windscribe_version.h @@ -2,7 +2,7 @@ #define WINDSCRIBE_MAJOR_VERSION 2 #define WINDSCRIBE_MINOR_VERSION 14 -#define WINDSCRIBE_BUILD_VERSION 5 +#define WINDSCRIBE_BUILD_VERSION 6 // only one of these should be enabled; neither -> stable //#define WINDSCRIBE_IS_BETA diff --git a/client/engine/engine/helper/installhelper_win.cpp b/client/engine/engine/helper/installhelper_win.cpp index c2d8c37f..d1b0062f 100644 --- a/client/engine/engine/helper/installhelper_win.cpp +++ b/client/engine/engine/helper/installhelper_win.cpp @@ -54,9 +54,9 @@ bool executeInstallHelperCmd() sinfo.cbSize = sizeof(SHELLEXECUTEINFO); sinfo.fMask = SEE_MASK_FLAG_DDEWAIT | SEE_MASK_NOCLOSEPROCESS; sinfo.hwnd = NULL; - sinfo.lpFile = installHelperExe.toStdWString().c_str(); + sinfo.lpFile = qUtf16Printable(installHelperExe); sinfo.lpParameters = L"/InstallService"; - sinfo.lpVerb = L"runas"; + sinfo.lpVerb = L"open"; sinfo.nShow = SW_HIDE; if (ShellExecuteEx(&sinfo)) { diff --git a/client/gui/application/singleappinstance.cpp b/client/gui/application/singleappinstance.cpp index 1e19a64b..c4ef3101 100644 --- a/client/gui/application/singleappinstance.cpp +++ b/client/gui/application/singleappinstance.cpp @@ -1,7 +1,7 @@ #include "singleappinstance.h" #include "singleappinstance_p.h" -#if defined(Q_OS_WINDOWS) +#if defined(Q_OS_WIN) #include #include "utils/winutils.h" #else @@ -26,7 +26,7 @@ SingleAppInstancePrivate::~SingleAppInstancePrivate() bool SingleAppInstancePrivate::activateRunningInstance() { - #if defined(Q_OS_WINDOWS) + #if defined(Q_OS_WIN) HWND hwnd = WinUtils::appMainWindowHandle(); if (hwnd) { @@ -72,7 +72,7 @@ bool SingleAppInstancePrivate::activateRunningInstance() bool SingleAppInstancePrivate::isRunning() { - #if defined(Q_OS_WINDOWS) + #if defined(Q_OS_WIN) if (!appSingletonObj_.isValid()) { @@ -125,7 +125,7 @@ bool SingleAppInstancePrivate::isRunning() void SingleAppInstancePrivate::release() { - #if defined(Q_OS_WINDOWS) + #if defined(Q_OS_WIN) appSingletonObj_.closeHandle(); #else localServer_.close(); diff --git a/client/gui/application/singleappinstance_p.h b/client/gui/application/singleappinstance_p.h index 903c7e99..31b06c17 100644 --- a/client/gui/application/singleappinstance_p.h +++ b/client/gui/application/singleappinstance_p.h @@ -2,7 +2,7 @@ #include -#if defined(Q_OS_WINDOWS) +#if defined(Q_OS_WIN) #include "utils/win32handle.h" #else #include @@ -27,7 +27,7 @@ class SingleAppInstancePrivate : public QObject void anotherInstanceRunning(); private: - #if defined(Q_OS_WINDOWS) + #if defined(Q_OS_WIN) wsl::Win32Handle appSingletonObj_; #else QString socketName_; diff --git a/client/gui/commongraphics/resizablewindow.cpp b/client/gui/commongraphics/resizablewindow.cpp index 2dfef6a9..24f7e5a5 100644 --- a/client/gui/commongraphics/resizablewindow.cpp +++ b/client/gui/commongraphics/resizablewindow.cpp @@ -89,9 +89,10 @@ int ResizableWindow::maximumHeight() return preferences_->appSkin() == APP_SKIN_VAN_GOGH ? maxHeight_ - kVanGoghOffset : maxHeight_; } -void ResizableWindow::setHeight(int height) +void ResizableWindow::setHeight(int height, bool ignoreMinimum) { - if (height < minimumHeight()*G_SCALE) { + // Callers may set ignoreMinimum to true for transient animations. + if (!ignoreMinimum && height < minimumHeight()*G_SCALE) { height = minimumHeight()*G_SCALE; } else if (height > maximumHeight()*G_SCALE) { height = maximumHeight()*G_SCALE; diff --git a/client/gui/commongraphics/resizablewindow.h b/client/gui/commongraphics/resizablewindow.h index 13c3768a..093ef1b5 100644 --- a/client/gui/commongraphics/resizablewindow.h +++ b/client/gui/commongraphics/resizablewindow.h @@ -26,7 +26,7 @@ class ResizableWindow : public ScalableGraphicsObject void setMaximumHeight(int height); int maximumHeight(); void setXOffset(int x); - void setHeight(int height); + void setHeight(int height, bool ignoreMinimum = false); void setScrollBarVisibility(bool on); void updateScaling() override; int scrollPos(); diff --git a/client/gui/mainwindow.cpp b/client/gui/mainwindow.cpp index c2fb06cf..07e9ed88 100644 --- a/client/gui/mainwindow.cpp +++ b/client/gui/mainwindow.cpp @@ -457,34 +457,10 @@ void MainWindow::showAfterLaunch() bool showAppMinimized = false; if (backend_ && backend_->getPreferences()->isStartMinimized()) { - showAppMinimized = true; - } -#if defined(Q_OS_WIN) || defined(Q_OS_LINUX) - else if (backend_ && backend_->getPreferences()->isMinimizeAndCloseToTray()) { - QCommandLineParser cmdParser; - cmdParser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions); - QCommandLineOption osRestartOption("os_restart"); - cmdParser.addOption(osRestartOption); - cmdParser.process(*WindscribeApplication::instance()); - if (cmdParser.isSet(osRestartOption)) { - showAppMinimized = true; - } - } -#endif - - if (showAppMinimized) { // Set active state to false; this affects the first click of the dock icon after launch if the app is docked. // This state is 'true' by default, and if left as is, the first click of the dock icon will not activate the app. activeState_ = false; -#ifdef Q_OS_WIN - // showMinimized, as of Qt 6.3.1, on Windows does not work. The app is displayed (shown) - // and all user input is disabled until ones clicks on the taskbar icon or alt-tabs back - // to the app. - show(); - QTimer::singleShot(50, this, &MainWindow::onMinimizeClick); -#else showMinimized(); -#endif } else { show(); diff --git a/client/gui/mainwindowcontroller.cpp b/client/gui/mainwindowcontroller.cpp index 8e1a3352..5f331f23 100644 --- a/client/gui/mainwindowcontroller.cpp +++ b/client/gui/mainwindowcontroller.cpp @@ -1135,6 +1135,7 @@ void MainWindowController::gotoLoginWindow() loginWindow_->setClickable(true); loginWindow_->setFocus(); isAtomicAnimationActive_ = false; + updateMainAndViewGeometry(true); handleNextWindowChange(); }); @@ -2344,7 +2345,7 @@ void MainWindowController::expandPreferencesFromLogin() animResize->setEndValue(target); animResize->setDuration(EXPAND_PREFERENCES_RESIZE_DURATION); connect(animResize, &QVariantAnimation::valueChanged, [this](const QVariant &value) { - preferencesWindow_->setHeight(value.toInt()); + preferencesWindow_->setHeight(value.toInt(), true); updateMainAndViewGeometry(false); shadowManager_->changeRectangleSize(ShadowManager::SHAPE_ID_PREFERENCES, QRect(0, childWindowShadowOffsetY(true), preferencesWindow_->boundingRect().width(), @@ -2414,7 +2415,7 @@ void MainWindowController::expandWindow(ResizableWindow *window) } } int target = windowSizeManager_->windowHeight(window)*G_SCALE; - window->setHeight(start); + window->setHeight(start, true); window->setScrollBarVisibility(false); window->setOpacity(0.0); @@ -2445,7 +2446,7 @@ void MainWindowController::expandWindow(ResizableWindow *window) animResize->setEndValue(target); animResize->setDuration(windowSizeManager_->resizeDurationMs(window)); connect(animResize, &QVariantAnimation::valueChanged, [this, window](const QVariant &value) { - window->setHeight(value.toInt()); + window->setHeight(value.toInt(), true); updateMainAndViewGeometry(false); shadowManager_->changeRectangleSize(windowSizeManager_->shapeId(window), QRect(0, @@ -2575,7 +2576,7 @@ void MainWindowController::collapsePreferencesFromLogin() animResize->setEndValue((int)loginWindow_->boundingRect().height()); animResize->setDuration(EXPAND_PREFERENCES_RESIZE_DURATION); connect(animResize, &QVariantAnimation::valueChanged, [this](const QVariant &value) { - preferencesWindow_->setHeight(value.toInt()); + preferencesWindow_->setHeight(value.toInt(), true); shadowManager_->changeRectangleSize(ShadowManager::SHAPE_ID_NEWS_FEED, QRect(0, childWindowShadowOffsetY(true), preferencesWindow_->boundingRect().width(), preferencesWindow_->boundingRect().height() - childWindowShadowOffsetY(false))); @@ -2651,7 +2652,7 @@ void MainWindowController::collapseWindow(ResizableWindow *window, bool bSkipBot animResize->setEndValue(target); animResize->setDuration(windowSizeManager_->resizeDurationMs(window)); connect(animResize, &QVariantAnimation::valueChanged, [this, window](const QVariant &value) { - window->setHeight(value.toInt()); + window->setHeight(value.toInt(), true); updateMainAndViewGeometry(false); shadowManager_->changeRectangleSize(windowSizeManager_->shapeId(window), QRect(0, @@ -3056,7 +3057,7 @@ void MainWindowController::updateMainAndViewGeometry(bool updateShadow) getGraphicsRegionWidthAndHeight(width, height, addHeightToGeometry); int shadowSize = shadowManager_->getShadowMargin(); - int widthWithShadow = width + shadowSize * 2; + int widthWithShadow = width + shadowSize * 2; int heightWithShadow = height + shadowSize * 2 + addHeightToGeometry; QRect geo = QRect(mainWindow_->pos().x(), mainWindow_->pos().y(), widthWithShadow, heightWithShadow); @@ -3107,16 +3108,17 @@ void MainWindowController::updateMainAndViewGeometry(bool updateShadow) } - // qDebug() << "Updating mainwindow geo: " << geo; - mainWindow_->setGeometry(geo); #ifdef Q_OS_LINUX // This is a workaround for #930. In some DEs on Linux, if the window is completely occluded by another, - // the above setGeometry() does not actually resize the window. Force the window to resize by setting a minimum size. + // the below setGeometry() does not actually resize the window. Force the window to resize by setting a minimum size. // Only do this if updateShadow is true, since doing this on every animation frame may make it seem jittery. if (updateShadow) { mainWindow_->setMinimumSize(geo.width(), geo.height()); } #endif + + // qDebug() << "Updating mainwindow geo: " << geo; + mainWindow_->setGeometry(geo); updateViewAndScene(width, height, shadowSize, updateShadow); } @@ -3284,7 +3286,9 @@ void MainWindowController::keepWindowInsideScreenCoordinates() bottom = std::max(bottom, screen->availableGeometry().bottom()); } - if (rcWindow.bottom() > bottom) { + // Subtract the shadow margin to match how taskbarAwareDockedGeometry_win calculates it. + // If we don't subtract the shadow margin, the window will move up slightly after being shown. + if (rcWindow.bottom() - shadowManager_->getShadowMargin() > bottom) { // qDebug() << "KEEPING MAINWINDOW INSIDE SCREEN COORDINATES"; rcWindow.moveBottom(bottom); mainWindow_->setGeometry(rcWindow); diff --git a/installer/linux/common/etc/windscribe/cgroups-up b/installer/linux/common/etc/windscribe/cgroups-up index d7bb5208..322f1b4a 100755 --- a/installer/linux/common/etc/windscribe/cgroups-up +++ b/installer/linux/common/etc/windscribe/cgroups-up @@ -65,7 +65,6 @@ if [ ! -f "$net_cls_root/windscribe/net_cls.classid" ]; then echo "$netclass" > "$net_cls_root/windscribe/net_cls.classid" fi -if [ "$mode" == "inclusive" ]; then # Allow IP rules to consult main routing table first, ignoring /0 or /1 routes ip rule add priority 16383 table main suppress_prefixlength 1 priority="`ip rule show | grep 51820 | cut -d ":" -f1`" # priority of WireGuard rule, if it exists @@ -76,7 +75,6 @@ else # For non-WG protocols, remove rule forcing other traffic into the tunnel ip rule del priority 16385 table windscribe_include fi -fi # make sure to exit with code 0 since an above command may fail if we are adding a duplicate rule or # deleting a non-existent rule; these are not errors diff --git a/libs/wsnet/src/dnsresolver/dnsresolver_cares.cpp b/libs/wsnet/src/dnsresolver/dnsresolver_cares.cpp index 8b956840..ca977e6d 100644 --- a/libs/wsnet/src/dnsresolver/dnsresolver_cares.cpp +++ b/libs/wsnet/src/dnsresolver/dnsresolver_cares.cpp @@ -20,9 +20,11 @@ DnsResolver_cares::DnsResolver_cares() : curRequestId_(0) DnsResolver_cares::~DnsResolver_cares() { + g_logger->info("DnsResolver_cares destructor started"); finish_ = true; condition_.notify_all(); thread_.join(); + g_logger->info("DnsResolver_cares destructor finished"); } bool DnsResolver_cares::init() diff --git a/libs/wsnet/src/httpnetworkmanager/curlnetworkmanager.cpp b/libs/wsnet/src/httpnetworkmanager/curlnetworkmanager.cpp index 16ae36fb..58abdb21 100644 --- a/libs/wsnet/src/httpnetworkmanager/curlnetworkmanager.cpp +++ b/libs/wsnet/src/httpnetworkmanager/curlnetworkmanager.cpp @@ -22,12 +22,14 @@ CurlNetworkManager::CurlNetworkManager(CurlFinishedCallback finishedCallback, Cu CurlNetworkManager::~CurlNetworkManager() { + g_logger->info("CurlNetworkManager destructor started"); finish_ = true; condition_.notify_all(); thread_.join(); if (isCurlGlobalInitialized_) curl_global_cleanup(); + g_logger->info("CurlNetworkManager destructor finished"); } bool CurlNetworkManager::init() @@ -108,6 +110,9 @@ void CurlNetworkManager::setWhitelistSocketsCallback(std::shared_ptr loggedSuccessDomains; + while (!finish_) { { @@ -175,6 +180,8 @@ void CurlNetworkManager::run() if (result != CURLE_OK) { g_logger->debug("Curl request error: {}", curl_easy_strerror(result)); + loggedSuccessDomains.erase(it->second->domain); + // Log all curl output for a failed request if (it->second->isDebugLogCurlError) { for (const auto &log: it->second->debugLogs) { @@ -183,12 +190,13 @@ void CurlNetworkManager::run() } } else { // Log curl output for a successful request, only strings containing "Trying" and "Connected" substrings to reduce log bloat - if (it->second->isDebugLogCurlError) { + if (it->second->isDebugLogCurlError && (!loggedSuccessDomains.count(it->second->domain))) { for (const auto &log: it->second->debugLogs) { if (log.find("Trying") != std::string::npos || log.find("Connected") != std::string::npos) { g_logger->info("{}", log); } } + loggedSuccessDomains.insert(it->second->domain); } } diff --git a/libs/wsnet/src/pingmanager/pingmanager.cpp b/libs/wsnet/src/pingmanager/pingmanager.cpp index 95a1dd2d..2e5221da 100644 --- a/libs/wsnet/src/pingmanager/pingmanager.cpp +++ b/libs/wsnet/src/pingmanager/pingmanager.cpp @@ -1,6 +1,7 @@ #include "pingmanager.h" #include #include "pingmethod_http.h" +#include "utils/wsnet_logger.h" #ifdef _WIN32 #include "pingmethod_icmp_win.h" @@ -23,6 +24,7 @@ PingManager::PingManager(boost::asio::io_context &io_context, WSNetHttpNetworkMa PingManager::~PingManager() { + g_logger->info("PingManager destructor started"); std::lock_guard locker(mutex_); #ifdef _WIN32 eventCallbackManager_.stop(); @@ -30,6 +32,7 @@ PingManager::~PingManager() processManager_.reset(); #endif map_.clear(); + g_logger->info("PingManager destructor finished"); } std::shared_ptr PingManager::ping(const std::string &ip, const std::string &hostname, PingType pingType, WSNetPingCallback callback) diff --git a/libs/wsnet/src/wsnet.cpp b/libs/wsnet/src/wsnet.cpp index 9792f504..a71f4043 100644 --- a/libs/wsnet/src/wsnet.cpp +++ b/libs/wsnet/src/wsnet.cpp @@ -44,7 +44,9 @@ class WSNet_impl : public WSNet { apiResourcesManager_.reset(); // This will cause the io_context run() call to return as soon as possible, abandoning unfinished operations and without permitting ready handlers to be dispatched. + g_logger->info("wsnet io_context_.stop"); io_context_.stop(); + g_logger->info("wsnet thread_.join"); thread_.join(); } @@ -184,8 +186,11 @@ std::shared_ptr WSNet::instance() void WSNet::cleanup() { + // Added more logs to debug cleanup hangs. Later can be deleted + g_logger->info("wsnet cleanup started"); std::lock_guard locker(g_mutex); g_wsNet.reset(); + g_logger->info("wsnet cleanup finished"); } bool WSNet::isValid() diff --git a/tools/vcpkg/update_dependencies.bat b/tools/vcpkg/update_dependencies.bat index f307402e..dbd777a0 100644 --- a/tools/vcpkg/update_dependencies.bat +++ b/tools/vcpkg/update_dependencies.bat @@ -1,4 +1,4 @@ @echo off REM This script installs or updates all dependencies locally -%VCPKG_ROOT%\vcpkg install --x-install-root=%VCPKG_ROOT%\installed --x-manifest-root=%~dp0 \ No newline at end of file +%VCPKG_ROOT%\vcpkg install --x-install-root=%VCPKG_ROOT%\installed --x-manifest-root=%~dp0 --triplet=x64-windows-static \ No newline at end of file