coap_net.c: Stop unnecessary coap_lg_crcv_t generation

This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2024-06-28 10:02:24 +01:00
1 parent 3c720f232f
commit 319ffb02c1
1 file changed
+3 -2
+3 -2
View File
@@ -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.
*/