1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

stop cpus from burning on slow networks

This commit is contained in:
sudden6 2016-01-21 02:35:06 +01:00
parent 641486d507
commit d4b2038bbb

View File

@ -23,6 +23,7 @@
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QCoreApplication>
#include <QThread>
#include <sodium/crypto_box.h>
#include <sodium/randombytes.h>
#include <string>
@ -40,6 +41,7 @@ QByteArray Toxme::makeJsonRequest(QString url, QString json, QNetworkReply::Netw
while (!reply->isFinished())
{
QThread::msleep(1);
qApp->processEvents();
}
@ -66,6 +68,7 @@ QByteArray Toxme::getServerPubkey(QString url, QNetworkReply::NetworkError &erro
while (!reply->isFinished())
{
QThread::msleep(1);
qApp->processEvents();
}