From cecd3f8a89693c5722b5e52baebb58edaef1a91c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 26 Sep 2021 20:54:43 +0200 Subject: tracker/s2bot: enable pipelining --- tracker-s2bot/ftnoir_tracker_s2bot.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"; -- cgit v1.2.3