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

Commit 4a513ab

Browse files
committed
Mention that resetting the timeout may be wrong on select retry.
1 parent 6d9d97e commit 4a513ab

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/interfaces/libpq/fe-misc.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
*
2727
* IDENTIFICATION
28-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.82 2002/10/14 17:33:08 momjian Exp $
28+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.83 2002/10/14 18:11:17 momjian Exp $
2929
*
3030
*-------------------------------------------------------------------------
3131
*/
@@ -824,7 +824,12 @@ pqWaitTimed(int forRead, int forWrite, PGconn *conn, const struct timeval *timeo
824824
{
825825
/*
826826
* select() may modify timeout argument on some platforms so
827-
* use copy
827+
* use copy.
828+
* XXX Do we really want to do that? If select() returns
829+
* the number of seconds remaining, we are resetting
830+
* the timeout to its original value. This will yeild
831+
* incorrect timings when select() is interrupted.
832+
* bjm 2002-10-14
828833
*/
829834
tmp_timeout = *timeout;
830835
ptmp_timeout = &tmp_timeout;

0 commit comments

Comments
 (0)