summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp')
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
index 8ebb27e58c..707c1acf48 100644
--- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
@@ -1640,15 +1640,14 @@ void tst_QUdpSocket::linkLocalIPv6()
sockets << s;
}
- QUdpSocket neutral;
- QVERIFY(neutral.bind(QHostAddress(QHostAddress::AnyIPv6)));
- QSignalSpy neutralReadSpy(&neutral, SIGNAL(readyRead()));
-
QByteArray testData("hello");
foreach (QUdpSocket *s, sockets) {
+ QUdpSocket neutral;
+ QVERIFY(neutral.bind(QHostAddress(QHostAddress::AnyIPv6)));
+ QSignalSpy neutralReadSpy(&neutral, SIGNAL(readyRead()));
+
QSignalSpy spy(s, SIGNAL(readyRead()));
- neutralReadSpy.clear();
QVERIFY(s->writeDatagram(testData, s->localAddress(), neutral.localPort()));
QTRY_VERIFY(neutralReadSpy.count() > 0); //note may need to accept a firewall prompt