enters a reconnect loop if the first connect fails