Skip to content

Commit 401a47a

Browse files
committed
[nrf fromtree] net: lib: coap_client: Fix timeout for separate response
When waiting for response after receiving the empty Ack, client actually used way too timeout. CoAP timeout only holds the timeout value in ms. t0 is the starting time. Signed-off-by: Seppo Takalo <[email protected]> (cherry picked from commit 6c16966)
1 parent 5ceb905 commit 401a47a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/lib/coap/coap_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ static int handle_response(struct coap_client *client, const struct coap_packet
793793
return 0;
794794
}
795795
internal_req->pending.t0 = k_uptime_get();
796-
internal_req->pending.timeout = internal_req->pending.t0 + COAP_SEPARATE_TIMEOUT;
796+
internal_req->pending.timeout = COAP_SEPARATE_TIMEOUT;
797797
internal_req->pending.retries = 0;
798798
return 1;
799799
}

0 commit comments

Comments
 (0)