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