mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 14:10:40 +02:00
attempt to avoid a hang on shutdown
This commit is contained in:
parent
cc5fe05268
commit
36ad3af48e
1 changed files with 1 additions and 1 deletions
|
@ -294,7 +294,7 @@ QNetworkReply* OBJReader::request(QUrl& url, bool isTest) {
|
||||||
QObject::connect(netReply, SIGNAL(finished()), &loop, SLOT(quit()));
|
QObject::connect(netReply, SIGNAL(finished()), &loop, SLOT(quit()));
|
||||||
loop.exec(); // Nothing is going to happen on this whole run thread until we get this
|
loop.exec(); // Nothing is going to happen on this whole run thread until we get this
|
||||||
static const int WAIT_TIMEOUT_MS = 500;
|
static const int WAIT_TIMEOUT_MS = 500;
|
||||||
while (qApp && !aboutToQuit && !netReply->isReadable()) {
|
while (!aboutToQuit && qApp && !netReply->isReadable()) {
|
||||||
netReply->waitForReadyRead(WAIT_TIMEOUT_MS); // so we might as well block this thread waiting for the response, rather than
|
netReply->waitForReadyRead(WAIT_TIMEOUT_MS); // so we might as well block this thread waiting for the response, rather than
|
||||||
}
|
}
|
||||||
QObject::disconnect(connection);
|
QObject::disconnect(connection);
|
||||||
|
|
Loading…
Reference in a new issue