socket_rpmsg: fix recv block when remote close early
MIRTOS-849 Change-Id: Id9ff88099bdc0efb27d64ffa8e407f5a9dd40e33 Signed-off-by: ligd <liguiding1@xiaomi.com> (cherry picked from commit 85b917e20869f415c847c37731c5745c7942a9fd)
This commit is contained in:
parent
b9ec0063bc
commit
92eec01f56
1 changed files with 5 additions and 0 deletions
|
|
@ -253,6 +253,11 @@ static int rpmsg_socket_wakeup(FAR struct rpmsg_socket_conn_s *conn)
|
|||
uint32_t space;
|
||||
int ret = 0;
|
||||
|
||||
if (!conn->ept.rdev)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
space = conn->recvpos - conn->lastpos;
|
||||
|
||||
if (space > circbuf_size(&conn->recvbuf) / 2)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue