diff options
Diffstat (limited to 'tests/auto/network/ssl')
-rw-r--r-- | tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index de759ae051..e32fa7c724 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -2838,11 +2838,19 @@ void tst_QSslSocket::qtbug18498_peek() client->setObjectName("client"); client->ignoreSslErrors(); - connect(client, SIGNAL(encrypted()), this, SLOT(exitLoop())); + int encryptedCounter = 2; + connect(client, &QSslSocket::encrypted, this, [&encryptedCounter, this](){ + if (!--encryptedCounter) + exitLoop(); + }); + WebSocket *serversocket = server.socket; + connect(serversocket, &QSslSocket::encrypted, this, [&encryptedCounter, this](){ + if (!--encryptedCounter) + exitLoop(); + }); connect(client, SIGNAL(disconnected()), this, SLOT(exitLoop())); client->startClientEncryption(); - WebSocket *serversocket = server.socket; QVERIFY(serversocket); serversocket->setObjectName("server"); |