mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
vh protocol destroy: dont miss vhosts
This commit is contained in:
parent
f66b84778c
commit
1673554c6b
1 changed files with 4 additions and 2 deletions
|
@ -1173,7 +1173,8 @@ lws_vhost_destroy1(struct lws_vhost *vh)
|
|||
assert(v->lserv_wsi == NULL);
|
||||
v->lserv_wsi = vh->lserv_wsi;
|
||||
vh->lserv_wsi = NULL;
|
||||
v->lserv_wsi->vhost = v;
|
||||
if (v->lserv_wsi)
|
||||
v->lserv_wsi->vhost = v;
|
||||
|
||||
lwsl_notice("%s: listen skt from %s to %s\n",
|
||||
__func__, vh->name, v->name);
|
||||
|
@ -1435,8 +1436,9 @@ lws_context_destroy(struct lws_context *context)
|
|||
if (context->protocol_init_done)
|
||||
vh = context->vhost_list;
|
||||
while (vh) {
|
||||
struct lws_vhost *vhn = vh->vhost_next;
|
||||
lws_vhost_destroy1(vh);
|
||||
vh = vh->vhost_next;
|
||||
vh = vhn;
|
||||
}
|
||||
|
||||
for (n = 0; n < context->count_threads; n++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue