meshctl: Retry recvmsg if data is not ready, else return error
PATCH 1/1 meshctl: Retry recvmsg if data is not ready, else return error
--- tools/mesh/gatt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tools/mesh/gatt.c +4 -1
@@ -415,8 +415,11 @@ static bool sock_read(struct io *io, bool prov, void *user_data) msg.msg_iovlen =1 ;while ((len =recvmsg (fd, &msg,MSG_DONTWAIT ))) { -if (len <=0 ) +if (len <=0 ) { +if (errno ==EAGAIN ) +break ;return false; + } res = buf; len_sar =mesh_gatt_sar (&res, len);
Signature · 1 line
2.20.1