coap_io.c: fix time propagation when removing node from sendqueue

PR #100 has fixed the propagation of elapsed time in coap_pop_next()
which affects the next node in the respective send queue. This fix
is also required for platform POSIX.
This commit is contained in:
Olaf Bergmann committed 2017-10-06 09:46:56 +02:00
1 parent 6ee35e4a37
commit 073016ebea
1 file changed
+1
+1
View File
@@ -727,6 +727,7 @@ coap_write(coap_context_t *ctx,
nextpdu = coap_peek_next(ctx);
while (nextpdu && now >= ctx->sendqueue_basetime && nextpdu->t <= now - ctx->sendqueue_basetime) {
nextpdu->t = 0;
coap_retransmit(ctx, coap_pop_next(ctx));
nextpdu = coap_peek_next(ctx);
}