modify for set conn status with connected when receive event USRSOCK_EVENT_SENDTO_READY

This commit is contained in:
daichuan 2024-10-15 22:47:56 +08:00 committed by Xiang Xiao
parent df47241a2b
commit a75ca4acf3
1 changed files with 2 additions and 1 deletions

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;
}