From 781b26fd1ca245cc241ded27da252452533fa3b0 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 22 Oct 2026 23:01:46 -0500 Subject: [PATCH] Completely disable connection caching on Qt 6.12+ --- app/backend/nvhttp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/backend/nvhttp.cpp b/app/backend/nvhttp.cpp index fca6088b..13ec4c4f 100644 --- a/app/backend/nvhttp.cpp +++ b/app/backend/nvhttp.cpp @@ -507,10 +507,13 @@ NvHTTP::openConnection(QUrl baseUrl, request.setAttribute(QNetworkRequest::Http2AllowedAttribute, false); #endif -#if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0) + // Use fine-grained idle timeouts to avoid calling QNetworkAccessManager::clearAccessCache(), // which tears down the NAM's global thread each time. We must not keep persistent connections // or GFE will puke. +#if QT_VERSION >= QT_VERSION_CHECK(6, 12, 0) + request.setAttribute(QNetworkRequest::ConnectionCacheExpiryTimeoutSecondsAttribute, -1); +#elif QT_VERSION >= QT_VERSION_CHECK(6, 3, 0) request.setAttribute(QNetworkRequest::ConnectionCacheExpiryTimeoutSecondsAttribute, 0); #endif