qt5base-lts/tests/auto/network/socket
Alex Trotsenko 378e26dd14 QUdpSocket: avoid infinite read notifier blocking
There was a small amount of time between the last readDatagram() call
and disabling a read notifier in case the socket had a pending
datagram. If a new datagram arrived in this period, this qualified as
absence of a datagram reader. Do not change the read notifier state
because it is disabled on canReadNotification() entry and always enabled
by the datagram reader.

Thanks to Peter Seiderer, who investigated the same: "Querying
hasPendingDatagrams() for enabling/disabling setReadNotificationEnabled()
is racy (a new datagram could arrive after readDatagam() is called and
before hasPendingDatagrams() is checked). But for unbuffered sockets the
ReadNotification is already disabled before the readReady signal is
emitted and should be re-enabled when calling read() or readDatagram()
from the user."

However, this patch does not completely solve the problem under Windows,
as the socket notifier may emit spurious notifications.

Task-number: QTBUG-46552
Change-Id: If7295d53ae2c788c39e86303502f38135c4d6180
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-10 12:50:58 +00:00
..
platformsocketengine fix usage of wince scope 2015-06-05 10:29:10 +00:00
qabstractsocket Update copyright headers 2015-02-11 06:49:51 +00:00
qhttpsocketengine Update copyright headers 2015-02-11 06:49:51 +00:00
qlocalsocket Skip instead of entirely excluding tests with disabled features 2015-03-16 09:34:15 +00:00
qsocks5socketengine Remove the tests for Ubuntu Oneiric (11.10) 2015-03-17 01:26:13 +00:00
qtcpserver fix usage of wince scope 2015-06-05 10:29:10 +00:00
qtcpsocket fix usage of wince scope 2015-06-05 10:29:10 +00:00
qudpsocket QUdpSocket: avoid infinite read notifier blocking 2015-09-10 12:50:58 +00:00
socket.pro WinRT: Fixed compilation of network autotests and benchmarks 2013-12-06 15:06:47 +01:00