Skip to content
Commit 704a2ca0 authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

socket/win32: flush pending read before signaling HUP

Unix and Windows gio GSocket behaves differently when the socket is
closed by the peer. On Unix, the client receives pending data before
receiving HUP. But on Windows, the HUP may come before, resulting in
unreliable and racy code. We should have same behaviour on all
platforms.

According to MSDN documentation: "an application should check for
remaining data upon receipt of FD_CLOSE to avoid any possibility of
losing data."

https://bugzilla.gnome.org/show_bug.cgi?id=669810
parent 6ca817c3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment