diff options
| author | Jan Wieck <JanWieck@Yahoo.com> | 2000-02-21 12:26:19 +0000 |
|---|---|---|
| committer | Jan Wieck <JanWieck@Yahoo.com> | 2000-02-21 12:26:19 +0000 |
| commit | da9501bddb42222dc33c031b1db6ce2133bcee7b (patch) | |
| tree | 57770df6bc2921eea1fc41369a1fb3192b48a32f /src | |
| parent | 4b4dbf8cba2f8af7b038823421e3f637ced50e1d (diff) | |
| download | postgresql-da9501bddb42222dc33c031b1db6ce2133bcee7b.tar.gz | |
Avoid race conditions in detection of EINPROGRESS during connect().
Jan
Diffstat (limited to 'src')
| -rw-r--r-- | src/interfaces/libpq/fe-connect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index a2c01d0883..8443b75f51 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -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 |
