usrsock: Don't clear recvfrom available flag
Don't clear available flag if the response indicate there is more data
@@ -83,8 +83,9 @@ static uint16_t recvfrom_event(FAR struct net_driver_s *dev,
pstate->valuelen_nontrunc = conn->resp.valuelen_nontrunc;
}
- if (pstate->reqstate.result >= 0 ||
- pstate->reqstate.result == -EAGAIN)
+ if (!(flags & USRSOCK_EVENT_RECVFROM_AVAIL) &&
+ (pstate->reqstate.result >= 0 ||
+ pstate->reqstate.result == -EAGAIN))
{
/* After reception of data, mark input not ready. Daemon will
* send event to restore this flag.
