net/rpmsg: Don't set POLLHUP if rpmsg channel has not been established

Signed-off-by: yintao <yintao@xiaomi.com>
This commit is contained in:
yintao 2023-11-28 21:25:19 +08:00 committed by archer
parent d5d9c501fa
commit 265978d16a
1 changed files with 2 additions and 1 deletions

View File

@ -950,7 +950,8 @@ static int rpmsg_socket_poll(FAR struct socket *psock,
}
else /* !_SS_ISCONNECTED(conn->sconn.s_flags) */
{
if (!conn->ept.rdev || conn->unbind)
if ((!conn->ept.rdev || conn->unbind) &&
!_SS_INITD(conn->sconn.s_flags))
{
eventset |= POLLHUP;
}