mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 09:30:47 +03:00
Disable http3 support by default and warn if users enable it
This commit is contained in:
parent
5523460f4e
commit
80a39cca17
1 changed files with 12 additions and 3 deletions
|
@ -13,6 +13,9 @@
|
||||||
|
|
||||||
#include <mtx/responses.hpp>
|
#include <mtx/responses.hpp>
|
||||||
|
|
||||||
|
#include "Logging.h"
|
||||||
|
#include "UserSettingsPage.h"
|
||||||
|
|
||||||
namespace http {
|
namespace http {
|
||||||
|
|
||||||
mtx::http::Client *
|
mtx::http::Client *
|
||||||
|
@ -20,9 +23,15 @@ client()
|
||||||
{
|
{
|
||||||
static auto client_ = [] {
|
static auto client_ = [] {
|
||||||
auto c = std::make_shared<mtx::http::Client>();
|
auto c = std::make_shared<mtx::http::Client>();
|
||||||
c->alt_svc_cache_path((QStandardPaths::writableLocation(QStandardPaths::CacheLocation) +
|
|
||||||
"/curl_alt_svc_cache.txt")
|
// Disabled by default until CPU usage and reliability improves
|
||||||
.toStdString());
|
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 c;
|
||||||
}();
|
}();
|
||||||
return client_.get();
|
return client_.get();
|
||||||
|
|
Loading…
Reference in a new issue