local: connect operation should jump self's connection

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-05-30 14:38:24 +08:00 committed by Petro Karashchenko
parent cd5ab80f2f
commit 390de249a0

View File

@ -269,6 +269,13 @@ int psock_local_connect(FAR struct socket *psock,
net_lock(); net_lock();
while ((conn = local_nextconn(conn)) != NULL) while ((conn = local_nextconn(conn)) != NULL)
{ {
/* Slef found, continue */
if (conn == psock->s_conn)
{
continue;
}
/* Handle according to the server connection type */ /* Handle according to the server connection type */
switch (conn->lc_type) switch (conn->lc_type)