mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 05:42:05 +08:00
rpmsg_sockif: recv/recvmsg return 0 when peer close
Follow the posix standard: If no messages are available to be received and the peer has performed an orderly shutdown, recv() shall return 0. Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
@@ -1301,7 +1301,7 @@ static ssize_t rpmsg_socket_recvmsg(FAR struct socket *psock,
|
||||
_SO_TIMEOUT(conn->sconn.s_rcvtimeo));
|
||||
if (!conn->ept.rdev || conn->unbind)
|
||||
{
|
||||
ret = -ECONNRESET;
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
nxmutex_lock(&conn->recvlock);
|
||||
|
||||
Reference in New Issue
Block a user