I've seen this not working on Windows in the way I'd expect by reading the code, as "connect" on Windows doesn't return "timeout", but returns "Operation already in progress" instead.