mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-23 00:00:06 +01:00
Fixes the binding error when SMP in tandem with a Unix domain socket
This commit is contained in:
parent
6517e01258
commit
8f5738299a
1 changed files with 16 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue