1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2026-01-01 01:41:18 +01:00

gnrc_sock: warn about non-zero receive timeouts with sock_async

This commit is contained in:
Martine Lenders 2022-02-23 15:53:57 +01:00
parent d43ad768f1
commit 4e88b7552b
No known key found for this signature in database
GPG Key ID: 2134D77A5336DD80

View File

@ -132,6 +132,14 @@ ssize_t gnrc_sock_recv(gnrc_sock_reg_t *reg, gnrc_pktsnip_t **pkt_out,
}
#endif
if (timeout != 0) {
#if defined(DEVELHELP) && IS_ACTIVE(SOCK_HAS_ASYNC)
if (reg->async_cb.generic) {
/* this warning is a false positive when sock_*_recv() was not called from
* the asynchronous handler */
LOG_WARNING("gnrc_sock: timeout != 0 within the asynchronous callback lead "
"to unexpected delays within the asynchronous handler.\n");
}
#endif
mbox_get(&reg->mbox, &msg);
}
else {