1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-30 00:00:16 +01:00

http: server: _lws_vhost_init_server_af only needed once

If we already have vh_listen_sockfd ready, call _lws_vhost_init_server_af
only once, regardless of IPv6 support.
This commit is contained in:
Dmitry Potapov 2024-05-03 19:24:34 +03:00 committed by Andy Green
parent 4eab8f5a19
commit 3b0eb45518

View file

@ -458,6 +458,11 @@ _lws_vhost_init_server(const struct lws_context_creation_info *info,
vhost->listen_port == CONTEXT_PORT_NO_LISTEN_SERVER)
return 0;
if (info && info->vh_listen_sockfd) {
a.af = AF_UNSPEC;
goto single;
}
/*
* Let's figure out what AF(s) we want this vhost to listen on.
*