mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-23 08:30:31 +00:00
Completely disable connection caching on Qt 6.12+
This commit is contained in:
1 parent
74173b26eb
commit
781b26fd1c
1 file changed
+4
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user