Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit da9501b

Browse files
Jan WieckJan Wieck
Jan Wieck
authored and
Jan Wieck
committed
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)