Eli Zaretskii wrote:

> +      {
> +#ifdef WIN32
> +     /* If the connection timed out, fd_close will hang in Gnulib's
> +        close_fd_maybe_socket, inside the call to WSAEnumNetworkEvents.  */
> +     if (errno != ETIMEDOUT)
> +#endif
> +       fd_close (sock);
> +      }
>      if (print)
>        logprintf (LOG_NOTQUIET, _("failed: %s.\n"), strerror (errno));
>      errno = save_errno;

I assume fd_close() could cause 'errno' to be set again (for some
strange reason?). So shouldn't 'save_errno' be printed instead?

  if (print)
    logprintf (LOG_NOTQUIET, _("failed: %s.\n"), strerror (save_errno));

Or a swap:
   errno = save_errno;
   if (print)
      logprintf (LOG_NOTQUIET, _("failed: %s.\n"), strerror (errno));


--gv

Reply via email to