net/rpmsg: support POLLHUP when unbind

rpmsg_socket_ns_unbind should notify pollhup when reconnect
Otherwise, uv_poll can't UV_DISCONNECT
eg:
if (revent & POLL_ERROR || revent & POLL_DISCONNECT)
           xxxx();

Signed-off-by: yintao <yintao@xiaomi.com>
This commit is contained in:
yintao 2024-11-26 11:41:41 +08:00 committed by Alan C. Assis
parent 54cdd8c269
commit 3fa55fb72e

View file

@ -479,7 +479,7 @@ static void rpmsg_socket_ns_unbind(FAR struct rpmsg_endpoint *ept)
conn->unbind = true;
rpmsg_socket_post(&conn->sendsem);
rpmsg_socket_post(&conn->recvsem);
rpmsg_socket_poll_notify(conn, POLLIN | POLLOUT);
rpmsg_socket_poll_notify(conn, POLLIN | POLLOUT | POLLHUP | POLLERR);
nxmutex_unlock(&conn->recvlock);
}