Merge pull request #9109 from haukepetersen/fix_emcute_nretries

net/emcute: use correct number of retries
This commit is contained in:
Martine Lenders 2018-05-28 12:20:57 +02:00 committed by GitHub
commit 23c5902d53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,7 +118,7 @@ static int syncsend(uint8_t resp, size_t len, bool unlock)
* remove was called */
thread_flags_clear(TFLAGS_ANY);
for (unsigned retries = 0; retries < EMCUTE_N_RETRY; retries++) {
for (unsigned retries = 0; retries <= EMCUTE_N_RETRY; retries++) {
DEBUG("[emcute] syncsend: sending round %i\n", retries);
sock_udp_send(&sock, tbuf, len, &gateway);
@ -128,7 +128,7 @@ static int syncsend(uint8_t resp, size_t len, bool unlock)
DEBUG("[emcute] syncsend: got response [%i]\n", result);
xtimer_remove(&timer);
res = result;
retries = EMCUTE_N_RETRY;
break;
}
}