]> sjero.net Git - wget/commitdiff
[svn] Make retryable_socket_connect_error return 0 on ENETUNREACH and
authorhniksic <devnull@localhost>
Sun, 24 Apr 2005 17:13:42 +0000 (10:13 -0700)
committerhniksic <devnull@localhost>
Sun, 24 Apr 2005 17:13:42 +0000 (10:13 -0700)
EHOSTUNREACH.

src/ChangeLog
src/connect.c

index eb496ec99efdd0758a571583321567fbbc8a4994..dbc1b27c2d3fbbee10a75a80b254992f217ddc22 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-24  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * connect.c (retryable_socket_connect_error): Return 0 for
+       ENETUNREACH and EHOSTUNREACH.
+
 2005-04-23  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * cmpt.c: Reenable the memmove implementation for systems that
index 1aab01bb583638e016f9330c7beb540477f275fb..a95301b20aa5c60674d4b7a0f735d463094fd441 100644 (file)
@@ -597,8 +597,16 @@ retryable_socket_connect_error (int err)
       )
     return 0;
 
-  if (err == ECONNREFUSED && !opt.retry_connrefused)
-    return 0;
+  if (!opt.retry_connrefused)
+    if (err == ECONNREFUSED
+#ifdef ENETUNREACH
+       || err == ENETUNREACH   /* network is unreachable */
+#endif
+#ifdef EHOSTUNREACH
+       || err == EHOSTUNREACH  /* host is unreachable */
+#endif
+       )
+      return 0;
 
   return 1;
 }