This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new a75ca4acf3 modify for set conn status with connected when receive 
event USRSOCK_EVENT_SENDTO_READY
a75ca4acf3 is described below

commit a75ca4acf3080b3c27bd1b2e7a196d3d38d2e125
Author: daichuan <daich...@xiaomi.com>
AuthorDate: Tue Oct 15 22:47:56 2024 +0800

    modify for set conn status with connected when receive event 
USRSOCK_EVENT_SENDTO_READY
---
 net/usrsock/usrsock_event.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/usrsock/usrsock_event.c b/net/usrsock/usrsock_event.c
index 66a61c5ffa..71fece8e72 100644
--- a/net/usrsock/usrsock_event.c
+++ b/net/usrsock/usrsock_event.c
@@ -77,7 +77,8 @@ int usrsock_event(FAR struct usrsock_conn_s *conn)
           conn->state = USRSOCK_CONN_STATE_READY;
           events |= USRSOCK_EVENT_CONNECT_READY;
 
-          if (conn->resp.result == 0)
+          if ((conn->resp.result == 0) ||
+              (events & USRSOCK_EVENT_SENDTO_READY))
             {
               conn->connected = true;
             }

Reply via email to