]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
On win32, retry reading when WSARecv returns WSAEWOULDBLOCK. There seem
authorMagnus Hagander <magnus@hagander.net>
Mon, 4 Jun 2007 13:39:34 +0000 (13:39 +0000)
committerMagnus Hagander <magnus@hagander.net>
Mon, 4 Jun 2007 13:39:34 +0000 (13:39 +0000)
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.

src/backend/port/win32/socket.c

index 328c617c231a7ede4e3c0995a5f9e0b6435bfe2a..4c9d7d27ba370e45bf37fa84fbce3a8e1a488e79 100644 (file)
@@ -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;