mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
libuv: run loop to clean up per-pt objects before exiting
This commit is contained in:
parent
80d84896f1
commit
b9c7f3df92
1 changed files with 4 additions and 4 deletions
|
@ -338,12 +338,12 @@ lws_libuv_destroyloop(struct lws_context *context, int tsi)
|
|||
uv_idle_stop(&pt->uv_idle);
|
||||
uv_close((uv_handle_t *)&pt->uv_idle, lws_uv_close_cb);
|
||||
|
||||
if (pt->ev_loop_foreign)
|
||||
return;
|
||||
|
||||
while (budget-- && uv_run(pt->io_loop_uv, UV_RUN_NOWAIT))
|
||||
;
|
||||
|
||||
if (pt->ev_loop_foreign)
|
||||
return;
|
||||
|
||||
uv_stop(pt->io_loop_uv);
|
||||
uv_walk(pt->io_loop_uv, lws_uv_walk_cb, NULL);
|
||||
while (uv_run(pt->io_loop_uv, UV_RUN_NOWAIT))
|
||||
|
@ -502,7 +502,7 @@ lws_libuv_stop(struct lws_context *context)
|
|||
}
|
||||
}
|
||||
|
||||
lwsl_info("%s: feels everything closed\n", __func__);
|
||||
lwsl_info("%s: started closing all wsi\n", __func__);
|
||||
if (context->count_wsi_allocated == 0)
|
||||
lws_libuv_kill(context);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue