simplify connect() timeout handling