From b49a1460e919d4dcd1c2074e62c1f63337383a75 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 31 Aug 2020 08:51:13 +0100 Subject: [PATCH] smp: unable to check for fd reuse since another thread can accept it --- lib/plat/unix/unix-fds.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/plat/unix/unix-fds.c b/lib/plat/unix/unix-fds.c index a236b9ba1..3ffb94a9c 100644 --- a/lib/plat/unix/unix-fds.c +++ b/lib/plat/unix/unix-fds.c @@ -81,6 +81,13 @@ int sanity_assert_no_sockfd_traces(const struct lws_context *context, lws_sockfd_type sfd) { +#if LWS_MAX_SMP > 1 + /* + * We can't really do this test... another thread can accept and + * reuse the closed fd + */ + return 0; +#else struct lws **p, **done; if (sfd == LWS_SOCK_INVALID) @@ -108,6 +115,7 @@ sanity_assert_no_sockfd_traces(const struct lws_context *context, assert(0); /* this fd is still in the tables */ return 1; +#endif } #endif