From 073016ebea97d20d499bd342aa8295eb6031b270 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Fri, 6 Oct 2017 09:46:56 +0200 Subject: [PATCH] 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. --- src/coap_io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/coap_io.c b/src/coap_io.c index 839a6c49..85c09878 100644 --- a/src/coap_io.c +++ b/src/coap_io.c @@ -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); }