Add a timeout to connecting