diff --git a/lib/roles/http/server/server.c b/lib/roles/http/server/server.c index 5f4b628a7..b44f16cc5 100644 --- a/lib/roles/http/server/server.c +++ b/lib/roles/http/server/server.c @@ -86,7 +86,7 @@ _lws_vhost_init_server_af(struct vh_sock_args *a) { struct lws_context *cx = a->vhost->context; struct lws_context_per_thread *pt; - int n, opt = 1, limit = 1; + int n, opt = 1, limit = 1, san = 2; lws_sockfd_type sockfd; struct lws *wsi; int m = 0, is; @@ -104,6 +104,9 @@ _lws_vhost_init_server_af(struct vh_sock_args *a) deal: + if (!san--) + return -1; + if (a->vhost->iface) { /*