Skip to content

Commit da9501b

Browse files
Jan WieckJan Wieck
authored andcommitted
Avoid race conditions in detection of EINPROGRESS during connect().
Jan
1 parent 4b4dbf8 commit da9501b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.120 2000/02/19 05:04:54 ishii Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.121 2000/02/21 12:26:19 wieck Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -853,7 +853,7 @@ connectDBStart(PGconn *conn)
853853
if (connect(conn->sock, &conn->raddr.sa, conn->raddr_len) < 0)
854854
{
855855
#ifndef WIN32
856-
if (errno == EINPROGRESS)
856+
if (errno == EINPROGRESS || errno == 0)
857857
#else
858858
if (WSAGetLastError() == WSAEINPROGRESS)
859859
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy