diff --git a/tests/auto/network/access/qhttp2connection/tst_qhttp2connection.cpp b/tests/auto/network/access/qhttp2connection/tst_qhttp2connection.cpp index dfa73a4a457..342ebd7e74b 100644 --- a/tests/auto/network/access/qhttp2connection/tst_qhttp2connection.cpp +++ b/tests/auto/network/access/qhttp2connection/tst_qhttp2connection.cpp @@ -153,7 +153,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);