diff --git a/tests/auto/network/access/qhttp2connection/tst_qhttp2connection.cpp b/tests/auto/network/access/qhttp2connection/tst_qhttp2connection.cpp index afedb1f4e50..211d24c2527 100644 --- a/tests/auto/network/access/qhttp2connection/tst_qhttp2connection.cpp +++ b/tests/auto/network/access/qhttp2connection/tst_qhttp2connection.cpp @@ -152,7 +152,8 @@ bool tst_QHttp2Connection::waitForSettingsExchange(QHttp2Connection *client, client->handleReadyRead(); // handle incoming frames, send response bool success = QTest::qWaitFor([&]() { - return settingsFrameReceived && serverSettingsFrameReceived; + return settingsFrameReceived && serverSettingsFrameReceived + && !client->waitingForSettingsACK && !server->waitingForSettingsACK; }); disconnect(c);