mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-10 02:40:40 +03:00
drop assertion on not wrapping
it is the idea of the relative-timestamps branch that such asserts are not necessary any more, and that if timestamps wrap, they just may. rephrased expression for determining t for clarity.
This commit is contained in:
1 parent
b116fc6d79
commit
edab7b40c4
1 file changed
+1
-2
@@ -547,9 +547,8 @@ coap_send_confirmed(coap_context_t *context,
|
||||
node->t = node->timeout;
|
||||
context->sendqueue_basetime = now;
|
||||
} else {
|
||||
assert(context->sendqueue_basetime <= now);
|
||||
/* make node->t relative to context->sendqueue_basetime */
|
||||
node->t = now + node->timeout - context->sendqueue_basetime;
|
||||
node->t = (now - context->sendqueue_basetime) + node->timeout;
|
||||
}
|
||||
|
||||
coap_insert_node(&context->sendqueue, node);
|
||||
|
||||
Reference in new issue
Block a user