mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Use string timeout parameter
This commit is contained in:
parent
11a3282136
commit
1fc68c5b7f
1 changed files with 3 additions and 1 deletions
|
@ -636,6 +636,7 @@ MatrixClient::sync() noexcept
|
||||||
endpoint.setQuery(query);
|
endpoint.setQuery(query);
|
||||||
|
|
||||||
QNetworkRequest request(QString(endpoint.toEncoded()));
|
QNetworkRequest request(QString(endpoint.toEncoded()));
|
||||||
|
request.setRawHeader("Connection", "keep-alive");
|
||||||
|
|
||||||
QNetworkReply *reply = get(request);
|
QNetworkReply *reply = get(request);
|
||||||
reply->setProperty("endpoint", static_cast<int>(Endpoint::Sync));
|
reply->setProperty("endpoint", static_cast<int>(Endpoint::Sync));
|
||||||
|
@ -688,7 +689,7 @@ void
|
||||||
MatrixClient::initialSync() noexcept
|
MatrixClient::initialSync() noexcept
|
||||||
{
|
{
|
||||||
QUrlQuery query;
|
QUrlQuery query;
|
||||||
query.addQueryItem("timeout", 0);
|
query.addQueryItem("timeout", "0");
|
||||||
query.addQueryItem("access_token", token_);
|
query.addQueryItem("access_token", token_);
|
||||||
|
|
||||||
QUrl endpoint(server_);
|
QUrl endpoint(server_);
|
||||||
|
@ -696,6 +697,7 @@ MatrixClient::initialSync() noexcept
|
||||||
endpoint.setQuery(query);
|
endpoint.setQuery(query);
|
||||||
|
|
||||||
QNetworkRequest request(QString(endpoint.toEncoded()));
|
QNetworkRequest request(QString(endpoint.toEncoded()));
|
||||||
|
request.setRawHeader("Connection", "keep-alive");
|
||||||
|
|
||||||
QNetworkReply *reply = get(request);
|
QNetworkReply *reply = get(request);
|
||||||
reply->setProperty("endpoint", static_cast<int>(Endpoint::InitialSync));
|
reply->setProperty("endpoint", static_cast<int>(Endpoint::InitialSync));
|
||||||
|
|
Loading…
Reference in a new issue