QUdpSocket::dataReady() triggered when sending data and there is no receiver
-
I'm using QUdpSocket to send and receive UDP datagrams to/from a different process. I find that sometimes, QUdpSocket::writeDatagram() actually triggers the readyRead() signal, but the "available datagram" is empty and has no sending address. I generally get this when sending to localhost/the loopback address, and I think it only happens when nobody actually listens on the port in question, or there is some other communication issue. The problem is otherwise exactly as described in:
https://stackoverflow.com/questions/58727702/qt-qudpsocket-triggers-readyread-on-sending-data
Please refer to that post for example code etc. Unfortunately, there isn't a lot of feedback; the one answer makes no sense, as the socket isn't connected.
Does anyone here have any insights?