Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.3
-
None
-
6a9d076e87f0c8aa4fb49bbcc2f56eefd85af2e3
Description
When updating from Qt 5.9.2 to 5.9.3 today, our UDP based network protocol stopped working on Windows 8.1!
The reason is that QUdpSocket::readDatagram() does not assign the sender address any more.
Here is some example code that fails with 5.9.3:
QHostAddress sender; QByteArray datagram; datagram.resize( m_requestSocket->pendingDatagramSize()); m_requestSocket->readDatagram( datagram.data(), datagram.size(), &sender); qDebug() << "sender:" << sender.isNull() << sender; processHeartbeat( datagram, sender); // output: sender: true QHostAddress("")
So sender.isNull() returns true, which should not be possible!
The same code is still working on Linux and Android.
Fortunately using QUdpSocket::receiveDatagram() instead seems to be working.
Attachments
Issue Links
- is duplicated by
-
QTBUG-65832 QUdpSocket::readDatagram() returns null QHostAddress
- Closed
- relates to
-
QTBUG-63605 Windows 10: QUdpSocket::receiveDatagram destinationAddress/Port not set
- Closed
For Gerrit Dashboard: QTBUG-64718 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
212436,4 | QUdpSocket: Work around WSARecvMsg quirk relating to no control block | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |