Fix an infinite connect request loop that may happen in some rare cases