From 7ec83a1b2a616195766011f44cb03a01c711275e Mon Sep 17 00:00:00 2001 From: hniksic Date: Sat, 1 Nov 2003 06:01:53 -0800 Subject: [PATCH] [svn] Don't call select_fd unless timeout is desired. --- src/ChangeLog | 5 +++++ src/connect.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e2a0afe1..7c6e6356 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-11-01 Hrvoje Niksic + + * connect.c (acceptport): Don't call select_fd when timeout is not + requested. + 2003-11-01 Hrvoje Niksic * host.c: Removed the ip_default_family global variable. diff --git a/src/connect.c b/src/connect.c index 605ccb45..12aaeb85 100644 --- a/src/connect.c +++ b/src/connect.c @@ -511,8 +511,9 @@ acceptport (int local_sock, int *sock) socklen_t addrlen = sizeof (ss); #ifdef HAVE_SELECT - if (select_fd (local_sock, opt.connect_timeout, 0) <= 0) - return ACCEPTERR; + if (opt.connect_timeout) + if (select_fd (local_sock, opt.connect_timeout, 0) <= 0) + return ACCEPTERR; #endif if ((*sock = accept (local_sock, sa, &addrlen)) < 0) return ACCEPTERR;