Short summary - I'm setting the git proxy on my Windows 7 machine to point to a locally running proxy application. When I stop running the application (validated with a telnet test) the git clone command hangs instead of identifying a closed socket. I can't reproduce this on a Mac.
My question is: Why does the Git proxy on windows fail to timeout? Is this a bug or by design?
Here are the steps I do (on a Mac) to confirm I can't reproduce the issue on a Mac.
MacBook-Pro:~ $ telnet localhost 1234
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
MacBook-Pro:~ $ git config --global http.proxy http://localhost:1234
MacBook-Pro:~ $ git clone https://github.com/HaskVan/HaskellKoans
Cloning into 'HaskellKoans'...
fatal: unable to access 'https://github.com/HaskVan/HaskellKoans/': Failed to connect to localhost port 1234: Connection refused
MacBook-Pro:~ $ git config --global --unset http.proxy
The equivalent sequence on my PC is:
c:\temp>telnet localhost 1234
Connecting To localhost...Could not open connection to the host, on port 1234: C
onnect failed
c:\temp>git config --global http.proxy http://localhost:1234
c:\temp>git clone https://github.com/HaskVan/HaskellKoans
Cloning into 'HaskellKoans'...
^C
c:\temp>git config --global --unset http.proxy
c:\temp>git clone https://github.com/HaskVan/HaskellKoans
fatal: destination path 'HaskellKoans' already exists and is not an empty direct
ory.
c:\temp>git clone https://github.com/HaskVan/HaskellKoans
Cloning into 'HaskellKoans'...
remote: Counting objects: 205, done.
Rremote: Total 205 (delta 0), reused 0 (delta 0)eceiving objects: 38% (78/205)
Receiving objects: 205)
Receiving objects: 100% (205/205), 26.27 KiB | 0 bytes/s, done.
Resolving deltas: 100% (114/114), done.
Checking connectivity... done.
Note in particular the ^C
(CTRL-C
) after the timeout. This is what this question is about.
The version I'm running on Windows is:
c:\temp>git --version
git version 1.9.0.msysgit.0
The version I'm running on my Mac is:
MacBook-Pro:~ $ git --version
git version 1.9.3 (Apple Git-50)