Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.14.2
-
None
-
% sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.3
BuildVersion: 19D76
Description
Test case
void tst_QHttpServer::disconnectedInEventLoop() { httpserver.route("/event-loop/", [] () { QEventLoop loop; QTimer::singleShot(1000, &loop, &QEventLoop::quit); loop.exec(); return QHttpServerResponse::StatusCode::Ok; }); const QUrl requestUrl(urlBase.arg("/event-loop/")); auto reply = networkAccessManager.get(QNetworkRequest(requestUrl)); QTimer::singleShot(500, reply, &QNetworkReply::abort); // cancel connection QEventLoop loop; connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); loop.exec(); reply->deleteLater(); }
Config: Using QtTest library 5.14.2, Qt 5.14.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 10.0.0 (clang-1000.11.45.5) (Apple))
PASS : tst_QHttpServer::initTestCase()
QFATAL : tst_QHttpServer::disconnectedInEventLoop() Received signal 11
Function time: 1008ms Total time: 1011ms
FAIL! : tst_QHttpServer::disconnectedInEventLoop() Received a fatal error.
Loc: [Unknown file(0)]
Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 1011ms
Attachments
For Gerrit Dashboard: QTBUG-84617 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
303121,3 | Don't destory socket and request objects while handling a request | master | qt/qthttpserver | Status: MERGED | +2 | 0 |