Skip to content
Snippets Groups Projects
Commit d8103790 authored by 張俊芝's avatar 張俊芝 Committed by Andy Green
Browse files

Fixes the binding error when SMP in tandem with a Unix domain socket

parent 8ed4574d
No related branches found
No related tags found
No related merge requests found
......@@ -131,6 +131,17 @@ done_list:
(void)n;
#if defined(__linux__)
#ifdef LWS_WITH_UNIX_SOCK
/*
* A Unix domain sockets cannot be bound for several times, even if we set
* the SO_REUSE* options on.
* However, fortunately, each thread is able to independently listen when
* running on a reasonably new Linux kernel. So we can safely assume
* creating just one listening socket for a multi-threaded environment won't
* fail in most cases.
*/
if (!LWS_UNIX_SOCK_ENABLED(vhost))
#endif
limit = vhost->context->count_threads;
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment