modify for set conn status with connected when receive event USRSOCK_EVENT_SENDTO_READY

This commit is contained in:
daichuan
2024-10-16 07:55:10 +08:00
committed by Xiang Xiao
parent df47241a2b
commit a75ca4acf3
+2 -1
View File
@@ -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;
}