bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Marking Release v1.17.1?


From: Eli Zaretskii
Subject: Re: [Bug-wget] Marking Release v1.17.1?
Date: Sun, 13 Dec 2015 17:52:56 +0200

> From: Gisle Vanem <address@hidden>
> Date: Sat, 12 Dec 2015 13:58:07 +0100
> 
> > Here's another one that I thought was already fixed, but apparently
> > wasn't - --connect-timeout doesn't work on Windows without this patch
> 
> You're right. This is needed:
> 
> --- src/connect.c~0     2014-12-02 09:49:37.000000000 +0200
> +++ src/connect.c       2015-03-17 17:14:48.414375000 +0200
> @@ -364,7 +364,12 @@ connect_to_ip (const ip_address *ip, int
>         logprintf.  */
>      int save_errno = errno;
>      if (sock >= 0)
> -      fd_close (sock);
> +      {
> +#ifdef WIN32
> +       if (errno != ETIMEDOUT)
> +#endif
> +         fd_close (sock);
> +      }
> 
> 
> But I don't really understand why. Care to explain?

I thought I explained this back in March, see

  http://lists.gnu.org/archive/html/bug-wget/2015-03/msg00134.html

If we call fd_close here with a socket that failed to connect, wget
hangs inside Gnulib's close_fd_maybe_socket, waiting for
WSAEnumNetworkEvents that never returns.  Why it never returns, I
don't know, but I suspect that a failed connection and a blocking
socket have something to do with that.

And yes, I think this should be applied.

>   --2015-12-12 12:43:06--  (try: 3)  http://10.0.0.22:21/
>   Connecting to 10.0.0.22:21... failed: Unknown error.
>   Giving up.
> 
>   Timer 1 off: 13.53.40  Elapsed: 0.00.33,08
> 
> Without you patch, that command never finishes.
> 
> The message wrongly says "Unknown error", but that is another matter...

In my testing (see the Mar 2015 message above) it said "Connection
timed out", as expected.  Can you see where did the value of errno get
overwritten?

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]