From 1fc68c5b7f9e77959c5bfaefb8427e91470b40b3 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Thu, 5 Oct 2017 08:47:29 +0300 Subject: [PATCH] Use string timeout parameter --- src/MatrixClient.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MatrixClient.cc b/src/MatrixClient.cc index 70fa4205..82643797 100644 --- a/src/MatrixClient.cc +++ b/src/MatrixClient.cc @@ -636,6 +636,7 @@ MatrixClient::sync() noexcept endpoint.setQuery(query); QNetworkRequest request(QString(endpoint.toEncoded())); + request.setRawHeader("Connection", "keep-alive"); QNetworkReply *reply = get(request); reply->setProperty("endpoint", static_cast(Endpoint::Sync)); @@ -688,7 +689,7 @@ void MatrixClient::initialSync() noexcept { QUrlQuery query; - query.addQueryItem("timeout", 0); + query.addQueryItem("timeout", "0"); query.addQueryItem("access_token", token_); QUrl endpoint(server_); @@ -696,6 +697,7 @@ MatrixClient::initialSync() noexcept endpoint.setQuery(query); QNetworkRequest request(QString(endpoint.toEncoded())); + request.setRawHeader("Connection", "keep-alive"); QNetworkReply *reply = get(request); reply->setProperty("endpoint", static_cast(Endpoint::InitialSync));