mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
server: SO_REUSEPORT: enable with LWS_MAX_SMP > 1
Either explicit option selection, or multiple SMP service threads, should enable SO_REUSEPORT https://github.com/warmcat/libwebsockets/issues/2470
This commit is contained in:
parent
b912958a67
commit
7451ce5cfb
1 changed files with 1 additions and 1 deletions
|
@ -261,7 +261,7 @@ done_list:
|
|||
n = lws_check_opt(a->vhost->options,
|
||||
LWS_SERVER_OPTION_ALLOW_LISTEN_SHARE);
|
||||
#endif
|
||||
if (n && cx->count_threads > 1)
|
||||
if (n || cx->count_threads > 1) /* ... also implied by threads > 1 */
|
||||
if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT,
|
||||
(const void *)&opt, sizeof(opt)) < 0) {
|
||||
compatible_close(sockfd);
|
||||
|
|
Loading…
Add table
Reference in a new issue