Update the lg_crcv for each block to prevent premature release during long transfers.

Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
This commit is contained in:
Krisztian Szilvasi authored and Jon Shallow committed 2025-12-03 15:45:00 +00:00
1 parent 0bf6a2d75c
commit 592b7bc1d6
1 file changed
+3
+3
View File
@@ -4160,6 +4160,9 @@ reinit:
if (updated_block) {
void *body_free;
/* Update last_used to prevent premature timeout during long transfers */
coap_ticks(&lg_crcv->last_used);
if ((session->block_mode & COAP_SINGLE_BLOCK_OR_Q) || block.bert) {
if (size2 < saved_offset + length) {
size2 = saved_offset + length;