<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40297 >
> [book - Fr 20. Jun 2008, 22:17:39]: > > This was reported on the forums: > http://forum.freeciv.org/viewtopic.php?t=4616 > > I'll see if I cannot port over some of the extensive > warclient fixes for just this issue (namely unix/win32 > error handling compatibility). > > > ---------------------------------------------------------------------- > 革命にようこそ > the errno check on EINPROGRESS is fine here, since EINPROGRESS and a few other errno values get redefined to their Winsock equivalent in netintf.h and the errno variable gets set to the result of WSAGetLastError() in my_connect(). In this case the problem was a missing check for EWOULDBLOCK in meta_read_response(). Patch attached.
Index: client/servers.c =================================================================== --- client/servers.c (revision 14680) +++ client/servers.c (working copy) @@ -350,7 +350,7 @@ result = my_readsocket(scan->sock, buf, sizeof(buf)); if (result < 0) { - if (errno == EAGAIN || errno == EINTR) { + if (errno == EAGAIN || errno == EINTR || errno == EWOULDBLOCK) { /* Keep waiting. */ return; }
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev