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
Please register or sign in to comment