From 75c638e2f89d8d550779cdddd646be45dac881ab Mon Sep 17 00:00:00 2001 From: Vladimir Golovnev Date: Sat, 18 Nov 2023 09:55:33 +0300 Subject: [PATCH] Add timeouts to network requests PR #19947. --- src/base/net/downloadmanager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/base/net/downloadmanager.cpp b/src/base/net/downloadmanager.cpp index 6a955f26b..c0fc63ecd 100644 --- a/src/base/net/downloadmanager.cpp +++ b/src/base/net/downloadmanager.cpp @@ -299,6 +299,8 @@ void Net::DownloadManager::processRequest(DownloadHandlerImpl *downloadHandler) // Qt doesn't support Magnet protocol so we need to handle redirections manually request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::ManualRedirectPolicy); + request.setTransferTimeout(); + QNetworkReply *reply = m_networkManager->get(request); connect(reply, &QNetworkReply::finished, this, [this, downloadHandler] { -- 2.11.4.GIT