summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp12
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");