mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-27 14:30:25 +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);
|
request.setAttribute(QNetworkRequest::Http2AllowedAttribute, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0)
|
|
||||||
// Use fine-grained idle timeouts to avoid calling QNetworkAccessManager::clearAccessCache(),
|
// 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
|
// which tears down the NAM's global thread each time. We must not keep persistent connections
|
||||||
// or GFE will puke.
|
// 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);
|
request.setAttribute(QNetworkRequest::ConnectionCacheExpiryTimeoutSecondsAttribute, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user