Skip to content

Commit

Permalink
server: Always return result of _lws_vhost_init_server_af
Browse files Browse the repository at this point in the history
Fixes #2702
  • Loading branch information
tjwalton authored and lws-team committed Nov 15, 2023
1 parent 7b5a070 commit 3179273
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/roles/http/server/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 3179273

Please sign in to comment.