From 319ffb02c11c5010b26934ba55f50a25ac3b6051 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Wed, 26 Jun 2024 19:13:45 +0100 Subject: [PATCH] coap_net.c: Stop unnecessary coap_lg_crcv_t generation --- src/coap_net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coap_net.c b/src/coap_net.c index dc36714c..b1323db4 100644 --- a/src/coap_net.c +++ b/src/coap_net.c @@ -4005,9 +4005,10 @@ coap_dispatch(coap_context_t *context, coap_session_t *session, * options. */ if (sent && - !coap_check_send_need_lg_crcv(session, pdu)) { + !coap_check_send_need_lg_crcv(session, pdu) && + COAP_PDU_IS_REQUEST(sent->pdu)) { /* - * lg_crcv was not set up in coap_send(). It coud have been set up + * lg_crcv was not set up in coap_send(). It could have been set up * the first separate response. * See if there already is a lg_crcv set up. */