1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

gcoap: expire memo and stop retransmissions on RESET reception

This commit is contained in:
Martine S. Lenders 2022-08-10 16:05:44 +02:00 committed by Martine Lenders
parent b616c17e46
commit f11c9e837d
No known key found for this signature in database
GPG Key ID: 2134D77A5336DD80

View File

@ -381,6 +381,15 @@ static void _process_coap_pdu(gcoap_socket_t *sock, sock_udp_ep_t *remote, sock_
return;
}
if (coap_get_type(&pdu) == COAP_TYPE_RST) {
DEBUG("gcoap: received RST, expiring potentially existing memo\n");
_find_req_memo(&memo, &pdu, remote, true);
if (memo) {
event_timeout_clear(&memo->resp_evt_tmout);
_expire_request(memo);
}
}
/* validate class and type for incoming */
switch (coap_get_code_class(&pdu)) {
/* incoming request or empty */