diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-26 20:54:43 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-26 21:10:13 +0200 |
commit | cecd3f8a89693c5722b5e52baebb58edaef1a91c (patch) | |
tree | a286401fd4d8cbf2537cc45eaf513c16cfe61be5 /tracker-s2bot | |
parent | f4fc292dbf6d5aa227750ead2f0b33d3e0a59f84 (diff) |
tracker/s2bot: enable pipelining
Diffstat (limited to 'tracker-s2bot')
-rw-r--r-- | tracker-s2bot/ftnoir_tracker_s2bot.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tracker-s2bot/ftnoir_tracker_s2bot.cpp b/tracker-s2bot/ftnoir_tracker_s2bot.cpp index c9d684aa..21cc88cb 100644 --- a/tracker-s2bot/ftnoir_tracker_s2bot.cpp +++ b/tracker-s2bot/ftnoir_tracker_s2bot.cpp @@ -38,7 +38,10 @@ void tracker_s2bot::run() { timer.setInterval((int)(1000./freq)); timer.setSingleShot(false); connect(&timer, &QTimer::timeout, [this] { - auto reply = m_nam->get(QNetworkRequest(QUrl("http://localhost:17317/poll"))); + QNetworkRequest req{QUrl("http://localhost:17317/poll")}; + req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true); + auto* reply = m_nam->get(req); + connect(reply, &QNetworkReply::finished, [this, reply] { if (reply->error() == QNetworkReply::NoError) { //qDebug() << "Request submitted OK"; |