qt5base-lts/tests/auto/corelib/kernel/qsocketnotifier
Alex Trotsenko a6ec869211 Fix the spurious socket notifications under Windows
To handle network events, QEventDispatcherWin32 uses I/O model
based on notifications through the window message queue. Having
successfully posted notification of a particular event to an
application window, no further messages for that network event
will be posted to the application window until the application
makes the function call that implicitly re-enables notification
of that network event. With these semantics, an application need
not read all available data in response to an FD_READ message:
a single recv in response to each FD_READ message is appropriate.
If an application issues multiple recv calls in response to a
single FD_READ, it can receive multiple FD_READ messages
(including spurious).

To solve this issue, this patch always disables the notifier
after getting a notification, and re-enables it only when the
message queue is empty.

Task-number: QTBUG-46552
Change-Id: I05df67032911cd1f5927fa7912f7864bfbf8711e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-10 12:51:02 +00:00
..
.gitignore Moving relevant tests to corelib/kernel 2011-09-01 12:42:14 +02:00
qsocketnotifier.pro Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
tst_qsocketnotifier.cpp Fix the spurious socket notifications under Windows 2015-09-10 12:51:02 +00:00