net: lwm2m: fixed "LwM2M message is invalid"
Do not retransmit a message that just has been send successfully. This case can in particular happen quite frequently if the modem connection/throughput is quite bad and so there is a high latency. A message that has to be acknowledged is scheduled for retransmission. Before retransmission a ack for this message is received that will cause a reset of the original message. In this case you see a "LwM2M message is invalid" error message. Signed-off-by: Andreas Chmielewski <andreas.chmielewski@grandcentrix.net>
This commit is contained in:
parent
58dadb8d18
commit
b52f1cdb59
1 changed files with 2 additions and 0 deletions
|
@ -918,6 +918,8 @@ void lwm2m_reset_message(struct lwm2m_message *msg, bool release)
|
|||
coap_reply_clear(msg->reply);
|
||||
}
|
||||
|
||||
sys_slist_find_and_remove(&msg->ctx->pending_sends, &msg->node);
|
||||
|
||||
if (release) {
|
||||
(void)memset(msg, 0, sizeof(*msg));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue