Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-39122

QUdpSocket fires readyRead multiple times

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • Some future release
    • 5.3.0
    • Network: Sockets
    • None
    • Windows 7, Qt 5.3.0 VS2013 Angle

      Simple test program: (QTest)

      QUdpSocket localsock1;
      localsock1.bind(QHostAddress(QHostAddress::LocalHost));

      QUdpSocket localsock2;
      localsock2.bind(QHostAddress(QHostAddress::LocalHost));

      QSignalSpy localsockspy(&localsock1,SIGNAL(readyRead()));

      localsock2.writeDatagram("TestData", QHostAddress(QHostAddress::LocalHost), localsock1.localPort());
      QTest::qWait(100);

      QCOMPARE(localsockspy.count(), 1);

      This will fail because readyRead was emit around 9 to 10 times. Older Qt versions (e.g. 5.2.1) does work correctly. This is not an actual bug, but the behaviour doesn't look right.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            peter-har Peter Hartmann
            zerocom Stefan Sommerfeld
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes