From fb912da252eaad0dfa1a491472446cae75cb618e Mon Sep 17 00:00:00 2001 From: zhanghu6 Date: Tue, 8 Feb 2022 18:00:16 +0800 Subject: [PATCH] local socket: cancel assert about backlog exceed 255 Signed-off-by: zhanghu6 --- net/local/local_listen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/local/local_listen.c b/net/local/local_listen.c index 409bf1c336..9ab91536ca 100644 --- a/net/local/local_listen.c +++ b/net/local/local_listen.c @@ -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