Handle connection timeouts properly (via SetConnectTimeout)

Here is the fix discussed in #65