Improve speed of process termination on exit

This commit is contained in:
Cameron Gutman
2019-03-17 12:23:13 -07:00
parent 052194714a
commit 9a6f5ba1a8
2 changed files with 7 additions and 2 deletions

View File

@@ -447,6 +447,7 @@ NvHTTP::openConnection(QUrl baseUrl,
// Run the request with a timeout if requested
QEventLoop loop;
connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), &loop, SLOT(quit()));
if (timeoutMs) {
QTimer::singleShot(timeoutMs, &loop, SLOT(quit()));
}