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

server: Always return result of _lws_vhost_init_server_af

Fixes https://github.com/warmcat/libwebsockets/issues/2702
This commit is contained in:
tjwalton 2022-09-30 00:32:11 +01:00 committed by Andy Green
parent 7b5a070efc
commit 3179273eae

View file

@ -407,6 +407,7 @@ _lws_vhost_init_server(const struct lws_context_creation_info *info,
struct lws_vhost *vhost)
{
struct vh_sock_args a;
int n;
a.info = info;
a.vhost = vhost;
@ -479,8 +480,9 @@ _lws_vhost_init_server(const struct lws_context_creation_info *info,
(vhost->options & LWS_SERVER_OPTION_IPV6_V6ONLY_VALUE))) {
#endif
a.af = AF_INET;
if (_lws_vhost_init_server_af(&a))
return 1;
n = _lws_vhost_init_server_af(&a);
if (n)
return n;
#if defined(LWS_WITH_IPV6)
}