mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
windows: defeat service if no vhosts
This commit is contained in:
parent
46b04f4ba4
commit
f66b84778c
2 changed files with 4 additions and 1 deletions
|
@ -2448,6 +2448,9 @@ lws_create_basic_wsi(struct lws_context *context, int tsi)
|
|||
{
|
||||
struct lws *new_wsi;
|
||||
|
||||
if (!context->vhost_list)
|
||||
return NULL;
|
||||
|
||||
if ((unsigned int)context->pt[tsi].fds_count ==
|
||||
context->fd_limit_per_thread - 1) {
|
||||
lwsl_err("no space for new conn\n");
|
||||
|
|
|
@ -164,7 +164,7 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
|
|||
int n, m;
|
||||
|
||||
/* stay dead once we are dead */
|
||||
if (context == NULL)
|
||||
if (context == NULL || !context->vhost_list)
|
||||
return 1;
|
||||
|
||||
pt = &context->pt[tsi];
|
||||
|
|
Loading…
Add table
Reference in a new issue