diff --git a/lib/core-net/vhost.c b/lib/core-net/vhost.c index aa999e6eb..1882281e8 100644 --- a/lib/core-net/vhost.c +++ b/lib/core-net/vhost.c @@ -958,7 +958,6 @@ lws_vhost_destroy1(struct lws_vhost *vh) lws_vhost_lock(vh); /* -------------- vh { */ - vh->being_destroyed = 1; #if defined(LWS_WITH_NETWORK) /* * PHASE 1: take down or reassign any listen wsi @@ -1040,6 +1039,8 @@ __lws_vhost_destroy2(struct lws_vhost *vh) struct lws wsi; int n; + vh->being_destroyed = 0; + #if defined(LWS_WITH_CLIENT) /* * destroy any wsi that are associated with us but have no socket