]> sjero.net Git - wget/commitdiff
[svn] Don't call select_fd unless timeout is desired.
authorhniksic <devnull@localhost>
Sat, 1 Nov 2003 14:01:53 +0000 (06:01 -0800)
committerhniksic <devnull@localhost>
Sat, 1 Nov 2003 14:01:53 +0000 (06:01 -0800)
src/ChangeLog
src/connect.c

index e2a0afe1b3433dd070d95ff454f237bf61b12903..7c6e6356594f13911c4598097b311e68c8855c61 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * connect.c (acceptport): Don't call select_fd when timeout is not
+       requested.
+
 2003-11-01  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * host.c: Removed the ip_default_family global variable.
index 605ccb459da74ac52092a904e1e23bd32f12e6dc..12aaeb8560cd81e7825f17c6e51675f05a93ec15 100644 (file)
@@ -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;