local socket: cancel assert about backlog exceed 255

Signed-off-by: zhanghu6 <zhanghu6@xiaomi.com>
This commit is contained in:
zhanghu6 2022-02-08 18:00:16 +08:00 committed by Xiang Xiao
parent 14c5f61e77
commit fb912da252

View File

@ -96,7 +96,11 @@ int local_listen(FAR struct socket *psock, int backlog)
/* Set the backlog value */
DEBUGASSERT((unsigned)backlog < 256);
if (backlog > 255)
{
backlog = 255;
}
server->u.server.lc_backlog = backlog;
/* Is this the first time since being bound to an address and that