diff options
author | Ron Frederick <ronf@timeheart.net> | 2021-10-30 06:14:28 +0100 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2021-10-30 06:24:04 +0100 |
commit | 7451ce5cfb708ef30fd06c7bacfde61a3467d94e (patch) | |
tree | 19ddd66e087ed28d818f0bdd4b13c731b093151b /lib | |
parent | b912958a678437030f609264a70de5d18017f37d (diff) | |
download | libwebsockets-7451ce5cfb708ef30fd06c7bacfde61a3467d94e.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/roles/http/server/server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/roles/http/server/server.c b/lib/roles/http/server/server.c index cb56907f..150eeec5 100644 --- a/lib/roles/http/server/server.c +++ b/lib/roles/http/server/server.c @@ -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); |