summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2024-10-08 23:49:29 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2024-10-08 23:49:29 +0200
commit80a39cca177a227e40806e350e7ffbb81adbca88 (patch)
tree56f574661630a45cd5ab0d2d515691b0646d0a11 /src
parentFix menu positions (diff)
downloadnheko-80a39cca177a227e40806e350e7ffbb81adbca88.tar.xz
Disable http3 support by default and warn if users enable it
Diffstat (limited to 'src')
-rw-r--r--src/MatrixClient.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/MatrixClient.cpp b/src/MatrixClient.cpp

index 05ec6a92..d3141efd 100644 --- a/src/MatrixClient.cpp +++ b/src/MatrixClient.cpp
@@ -13,6 +13,9 @@ #include <mtx/responses.hpp> +#include "Logging.h" +#include "UserSettingsPage.h" + namespace http { mtx::http::Client * @@ -20,9 +23,15 @@ client() { static auto client_ = [] { auto c = std::make_shared<mtx::http::Client>(); - c->alt_svc_cache_path((QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + - "/curl_alt_svc_cache.txt") - .toStdString()); + + // Disabled by default until CPU usage and reliability improves + if (UserSettings::instance()->qsettings()->value("enable_http3").toBool()) { + nhlog::net()->warn("Enabling http3 support. This is currently usually a worse " + "experience, so you are on your own."); + c->alt_svc_cache_path((QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + + "/curl_alt_svc_cache.txt") + .toStdString()); + } return c; }(); return client_.get();