xiaoxiang781216 commented on code in PR #6972: URL: https://github.com/apache/incubator-nuttx/pull/6972#discussion_r960162073
########## net/usrsock/usrsock_recvmsg.c: ########## @@ -442,6 +442,12 @@ ssize_t usrsock_recvmsg(FAR struct socket *psock, FAR struct msghdr *msg, *fromlen = outaddrlen; } + if (conn->flags & USRSOCK_EVENT_REMOTE_CLOSED && Review Comment: With this patch, recvmsg always return 0 even in the abnormal case happen(cable unplug or disconnect from AP), which may not good. We would prefer fix the test case here instead: https://github.com/apache/incubator-nuttx-apps/pull/1304/commits/afd6554bab2acbf2cba4f20d39c46f36396a66fe ########## net/usrsock/usrsock_recvmsg.c: ########## @@ -442,6 +442,12 @@ ssize_t usrsock_recvmsg(FAR struct socket *psock, FAR struct msghdr *msg, *fromlen = outaddrlen; } + if (conn->flags & USRSOCK_EVENT_REMOTE_CLOSED && Review Comment: @masayuki2009 With this patch, recvmsg always return 0 even in the abnormal case happen(cable unplug or disconnect from AP), which may not good. We would prefer fix the test case here instead: https://github.com/apache/incubator-nuttx-apps/pull/1304/commits/afd6554bab2acbf2cba4f20d39c46f36396a66fe -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org