NOEXPORT void exec_connect_loop(CLI *c) {
    unsigned long long seq=0;
    char *fresh_id=c->tls->id;
    unsigned retry;

    do {
        /* make sure c->tls->id is valid in str_printf() */
        char *id=str_printf("%s_%llu", fresh_id, seq++);
        str_detach(id);
        c->tls->id=id;

        exec_connect_once(c);
        /* retry is asynchronously changed in the main thread,
         * so we make sure to use the same value for both checks */
        retry=c->opt->option.retry;
        if(retry) {
            s_log(LOG_INFO, "Retrying an exec+connect section");
            /* c and id are detached, so it is safe to call str_stats() */
            str_stats(); /* client thread allocation tracking */
            s_poll_sleep(1, 0);
            c->rr++;
        }

        /* make sure c->tls->id is valid in str_free() */
        c->tls->id=fresh_id;
        str_free(id);
    } while(retry); /* retry is disabled on config reload */
}
NOEXPORT void exec_connect_loop(CLI *c) {
    unsigned long long seq=0;
    char *fresh_id=c->tls->id;
    unsigned retry;

    do {
         
        char *id=str_printf("%s_%llu", fresh_id, seq++);
        str_detach(id);
        c->tls->id=id;

        exec_connect_once(c);
         
        retry=c->opt->option.retry;
        if(retry) {
            s_log(LOG_INFO, "Retrying an exec+connect section");
             
            str_stats();  
            s_poll_sleep(1, 0);
            c->rr++;
        }

         
        c->tls->id=fresh_id;
        str_free(id);
    } while(retry);  
}