Still with the same 'read after close' thing...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -751,20 +751,9 @@ int GSocket_Write(GSocket *socket, const char *buffer, int size)
|
||||
*/
|
||||
GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags)
|
||||
{
|
||||
GSocketEventFlags result = 0;
|
||||
char c;
|
||||
|
||||
assert(socket != NULL);
|
||||
|
||||
result = flags & socket->m_detected;
|
||||
|
||||
if ((flags & GSOCK_INPUT_FLAG) &&
|
||||
(recv(socket->m_fd, &c, 1, MSG_PEEK) > 0))
|
||||
{
|
||||
result |= GSOCK_INPUT_FLAG;
|
||||
}
|
||||
|
||||
return result;
|
||||
return flags & socket->m_detected;
|
||||
}
|
||||
|
||||
/* Flags */
|
||||
|
Reference in New Issue
Block a user