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:
parent
7a9aa9539c
commit
e2cf0cad39
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue