net/rpmsg: add err handle when rpmsg_socket_unbind called

After waiting, it is necessary to check if the connection
has been disconnected

Signed-off-by: yintao <yintao@xiaomi.com>
This commit is contained in:
yintao
2025-01-02 19:24:28 +08:00
committed by Alan C. Assis
parent 3fa55fb72e
commit 741324d73c
+4
View File
@@ -778,6 +778,10 @@ static int rpmsg_socket_connect_internal(FAR struct socket *psock)
ret = net_sem_timedwait(&conn->sendsem,
_SO_TIMEOUT(conn->sconn.s_sndtimeo));
if (!conn->ept.rdev || conn->unbind)
{
ret = -ECONNRESET;
}
if (ret < 0)
{