Commit 3258484d authored by Bruce Momjian's avatar Bruce Momjian

Add tv_sec change for connection timeout suggested by author.

parent 2177b6b6
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.207 2002/10/11 04:12:14 momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.208 2002/10/11 04:41:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -1078,7 +1078,8 @@ connectDBComplete(PGconn *conn)
finish_time = time((time_t *) NULL) + remains.tv_sec;
}
while (rp == NULL || remains.tv_sec > 0 || remains.tv_usec > 0)
while (rp == NULL || remains.tv_sec > 0 ||
(remains.tv_sec == 0 && remains.tv_usec > 0))
{
/*
* Wait, if necessary. Note that the initial state (just after
......@@ -1131,10 +1132,7 @@ connectDBComplete(PGconn *conn)
return 0;
}
if (finish_time > current_time)
remains.tv_sec = finish_time - current_time;
else
remains.tv_sec = 0;
remains.tv_sec = finish_time - current_time;
remains.tv_usec = 0;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment