1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

nanocoap_sock: release rx buffer on RESET

We must not return without calling sock_udp_recv_buf() again.
This commit is contained in:
Benjamin Valentin 2022-05-03 03:49:37 +02:00
parent 1b92fb9858
commit d03c6390c8

View File

@ -220,7 +220,8 @@ ssize_t nanocoap_sock_request_cb(nanocoap_sock_t *sock, coap_pkt_t *pkt,
switch (coap_get_type(pkt)) { switch (coap_get_type(pkt)) {
case COAP_TYPE_RST: case COAP_TYPE_RST:
/* TODO: handle different? */ /* TODO: handle different? */
return -EBADMSG; res = -EBADMSG;
break;
case COAP_TYPE_CON: case COAP_TYPE_CON:
_send_ack(sock, pkt); _send_ack(sock, pkt);
/* fall-through */ /* fall-through */