From 3fa55fb72e41437aface7faa7a5621dd7e4302c5 Mon Sep 17 00:00:00 2001 From: yintao Date: Tue, 26 Nov 2024 11:41:41 +0800 Subject: [PATCH] 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 --- net/rpmsg/rpmsg_sockif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rpmsg/rpmsg_sockif.c b/net/rpmsg/rpmsg_sockif.c index 0386ffc5408..f046d667b5d 100644 --- a/net/rpmsg/rpmsg_sockif.c +++ b/net/rpmsg/rpmsg_sockif.c @@ -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); }