aboutsummaryrefslogtreecommitdiff
path: root/launcher/net
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2023-05-28 10:11:43 -0300
committerGitHub <noreply@github.com>2023-05-28 10:11:43 -0300
commitce2d58bb7d7e99da61b906253c0fea7815a82862 (patch)
treef958cd21fee8cba488e82229a1457db368079221 /launcher/net
parentf24211e8b5d9af24ac3e27b0fdb50000a962c35f (diff)
parent7af116fb006e2eb62429740bd0abbe14f50ff244 (diff)
downloadPrismLauncher-ce2d58bb7d7e99da61b906253c0fea7815a82862.tar.gz
PrismLauncher-ce2d58bb7d7e99da61b906253c0fea7815a82862.tar.bz2
PrismLauncher-ce2d58bb7d7e99da61b906253c0fea7815a82862.zip
Merge pull request #1083 from Ryex/fix/memory-leaks-develop
Diffstat (limited to 'launcher/net')
-rw-r--r--launcher/net/Download.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/launcher/net/Download.cpp b/launcher/net/Download.cpp
index cd3fcc85..7f8d3a06 100644
--- a/launcher/net/Download.cpp
+++ b/launcher/net/Download.cpp
@@ -134,11 +134,14 @@ void Download::executeTask()
request.setRawHeader("Authorization", token.toUtf8());
}
+#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
+ request.setTransferTimeout();
+#endif
+
m_last_progress_time = m_clock.now();
m_last_progress_bytes = 0;
QNetworkReply* rep = m_network->get(request);
-
m_reply.reset(rep);
connect(rep, &QNetworkReply::downloadProgress, this, &Download::downloadProgress);
connect(rep, &QNetworkReply::finished, this, &Download::downloadFinished);