]> granicus.if.org Git - postgresql/commitdiff
Avoid race conditions in detection of EINPROGRESS during connect().
authorJan Wieck <JanWieck@Yahoo.com>
Mon, 21 Feb 2000 12:26:19 +0000 (12:26 +0000)
committerJan Wieck <JanWieck@Yahoo.com>
Mon, 21 Feb 2000 12:26:19 +0000 (12:26 +0000)
Jan

src/interfaces/libpq/fe-connect.c

index a2c01d0883c2741e12261b28d7233370884b19d6..8443b75f5178ee9c753bfb8e12dacfd8a21edfa7 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.120 2000/02/19 05:04:54 ishii Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.121 2000/02/21 12:26:19 wieck Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -853,7 +853,7 @@ connectDBStart(PGconn *conn)
        if (connect(conn->sock, &conn->raddr.sa, conn->raddr_len) < 0)
        {
 #ifndef WIN32
-               if (errno == EINPROGRESS)
+               if (errno == EINPROGRESS || errno == 0)
 #else
                if (WSAGetLastError() == WSAEINPROGRESS)
 #endif