+ // We may get a FD_READ notification even when there is no data
+ // to read on the socket, in particular this happens on socket
+ // creation when we seem to always get FD_CONNECT, FD_WRITE and
+ // FD_READ notifications all at once (but it doesn't happen
+ // only then). Ignore such dummy notifications.
+ {
+ fd_set fds;
+ timeval tv = { 0 };
+
+ wxFD_ZERO(&fds);
+ wxFD_SET(socket->m_fd, &fds);
+
+ if ( select(socket->m_fd + 1, &fds, NULL, NULL, &tv) != 1 )
+ return 0;
+ }
+