diff --git a/net/usrsock/usrsock_connect.c b/net/usrsock/usrsock_connect.c index 6e40fc0eb1..7793f6847a 100644 --- a/net/usrsock/usrsock_connect.c +++ b/net/usrsock/usrsock_connect.c @@ -65,7 +65,7 @@ static uint16_t connect_event(FAR struct net_driver_s *dev, nxsem_post(&pstate->recvsem); } - else if (flags & USRSOCK_EVENT_REQ_COMPLETE) + else { ninfo("request completed.\n"); @@ -199,7 +199,8 @@ int usrsock_connect(FAR struct socket *psock, ret = usrsock_setup_request_callback(conn, &state, connect_event, USRSOCK_EVENT_ABORT | - USRSOCK_EVENT_REQ_COMPLETE); + USRSOCK_EVENT_REQ_COMPLETE | + USRSOCK_EVENT_SENDTO_READY); if (ret < 0) { nwarn("usrsock_setup_request_callback failed: %d\n", ret);