Handle timeouts while connecting