diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2015-08-11 13:23:32 +0300 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2015-09-10 12:51:02 +0000 |
commit | a6ec869211d67fed94e3513dc453a96717155121 (patch) | |
tree | abdf5a1a449c9b8474e6c7db17a617fd7766afb2 /src/platformsupport | |
parent | 378e26dd14df808a55471330400984841ef414d4 (diff) |
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>
Diffstat (limited to 'src/platformsupport')
0 files changed, 0 insertions, 0 deletions