diff --git a/net/usrsock/usrsock_sendmsg.c b/net/usrsock/usrsock_sendmsg.c index 13428e2ced5..7dd9176c46a 100644 --- a/net/usrsock/usrsock_sendmsg.c +++ b/net/usrsock/usrsock_sendmsg.c @@ -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.