net/rpmsg: read receiving data after unbind
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
618d47570d
commit
44b08d3a67
|
@ -898,26 +898,24 @@ static int rpmsg_socket_poll(FAR struct socket *psock,
|
|||
{
|
||||
eventset |= POLLHUP;
|
||||
}
|
||||
else
|
||||
|
||||
nxmutex_lock(&conn->sendlock);
|
||||
|
||||
if (rpmsg_socket_get_space(conn) > 0)
|
||||
{
|
||||
nxmutex_lock(&conn->sendlock);
|
||||
|
||||
if (rpmsg_socket_get_space(conn) > 0)
|
||||
{
|
||||
eventset |= POLLOUT;
|
||||
}
|
||||
|
||||
nxmutex_unlock(&conn->sendlock);
|
||||
|
||||
nxmutex_lock(&conn->recvlock);
|
||||
|
||||
if (!circbuf_is_empty(&conn->recvbuf))
|
||||
{
|
||||
eventset |= POLLIN;
|
||||
}
|
||||
|
||||
nxmutex_unlock(&conn->recvlock);
|
||||
eventset |= POLLOUT;
|
||||
}
|
||||
|
||||
nxmutex_unlock(&conn->sendlock);
|
||||
|
||||
nxmutex_lock(&conn->recvlock);
|
||||
|
||||
if (!circbuf_is_empty(&conn->recvbuf))
|
||||
{
|
||||
eventset |= POLLIN;
|
||||
}
|
||||
|
||||
nxmutex_unlock(&conn->recvlock);
|
||||
}
|
||||
else if (!_SS_ISCONNECTED(conn->sconn.s_flags) &&
|
||||
_SS_ISNONBLOCK(conn->sconn.s_flags))
|
||||
|
|
Loading…
Reference in New Issue