syncsend() is used also for the initial packet, so resending while (retries <= EMCUTE_N_RETRY) is the correct behavior.