Web lists-archives.com

Something makes curl hang for 5 minutes after connection refused




Hi.

Recently I noticed that `curl` does not fail immediately after connection refused, but waits for 5 minutes.

This only happens on my machine and only with the `Cygwin` version of `curl`. The mingw version is unaffected.
I tried downgrading curl, but it didn't help. I thought there's a rogue setting in `/etc` or in home or maybe some environment variable, but I couldn't find it.

    basin@BASIN /cygdrive/c/Users/basin
    $ >/dev/null /usr/bin/curl -v http://127.0.0.1:2/
    * STATE: INIT => CONNECT handle 0x80048658; line 1404 (connection #-5000)
    * Added connection 0. The cache now contains 1 members
    *   Trying 127.0.0.1...
    * TCP_NODELAY set
    * STATE: CONNECT => WAITCONNECT handle 0x80048658; line 1456 (connection #0)
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:--  0:04:59 --:--:--     0* Connection timed out after 300145 milliseconds
    * multi_done
    * stopped the pause stream!
      0     0    0     0    0     0      0      0 --:--:--  0:05:00 --:--:--     0
    * Closing connection 0
    * The cache now contains 0 members
    curl: (28) Connection timed out after 300145 milliseconds
   
    basin@BASIN /cygdrive/c/Users/basin
    $ /usr/bin/curl --version
    curl 7.59.0 (i686-pc-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p zlib/1.2.11 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0 nghttp2/1.31.0
    Release-Date: 2018-03-14
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
    Features: AsynchDNS Debug IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL Metalink

Can someone try to reproduce it?


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple