On win32, retry reading when WSARecv returns WSAEWOULDBLOCK. There seem

to be cases when at least Windows 2000 can do this even though select
just indicated that the socket is readable.

Per report and analysis from Cyril VELTER.
REL8_1_STABLE
Magnus Hagander 19 years ago
parent cec960f2e3
commit ca82953745
  1. 3
      src/backend/port/win32/socket.c

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/port/win32/socket.c,v 1.10.2.2 2006/10/13 14:00:17 teodor Exp $
* $PostgreSQL: pgsql/src/backend/port/win32/socket.c,v 1.10.2.3 2007/06/04 13:39:34 mha Exp $
*
*-------------------------------------------------------------------------
*/
@ -289,6 +289,7 @@ pgwin32_recv(SOCKET s, char *buf, int len, int f)
int r;
DWORD b;
DWORD flags = f;
int n;
if (pgwin32_poll_signals())
return -1;

Loading…
Cancel
Save