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

gcoap: expire memo if there is nothing to wait for

This commit is contained in:
Martine S. Lenders 2022-08-09 16:20:22 +02:00 committed by Martine Lenders
parent 2cd785791d
commit b616c17e46
No known key found for this signature in database
GPG Key ID: 2134D77A5336DD80

View File

@ -579,6 +579,11 @@ static void _on_resp_timeout(void *arg) {
*/
static void _cease_retransmission(gcoap_request_memo_t *memo) {
memo->state = GCOAP_MEMO_WAIT;
/* there is also no response handler to wait for => expire memo */
if (memo->resp_handler == NULL) {
event_timeout_clear(&memo->resp_evt_tmout);
_expire_request(memo);
}
}
/*