The connect timeout code wasn't working on Windows.

Rather than trying to second-guess the various error returns
of a second connect(), use select() to determine whether the
socket becomes writable (which means connected).
1 file changed