From cd06a72916bd234fd5dfdaea4def50f178440614 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Sat, 12 Apr 2025 16:51:28 +0100 Subject: [PATCH] coap-client.c: Do not report token failures for ping packets in nack handler --- examples/coap-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/coap-client.c b/examples/coap-client.c index f473b17a..919287f7 100644 --- a/examples/coap-client.c +++ b/examples/coap-client.c @@ -359,7 +359,7 @@ nack_handler(coap_session_t *session COAP_UNUSED, if (sent) { coap_bin_const_t token = coap_pdu_get_token(sent); - if (!track_check_token(&token)) { + if (coap_pdu_get_code(sent) != COAP_EMPTY_CODE && !track_check_token(&token)) { coap_log_err("nack_handler: Unexpected token\n"); } }