libuv only cleanup if in use
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
86224b5093
commit
027fb683cc
1 changed files with 9 additions and 6 deletions
|
@ -390,14 +390,17 @@ lws_context_destroy(struct lws_context *context)
|
|||
|
||||
for (n = 0; n < context->count_threads; n++) {
|
||||
#ifdef LWS_USE_LIBEV
|
||||
ev_io_stop(context->pt[n].io_loop_ev,
|
||||
&context->pt[n].w_accept.ev_watcher);
|
||||
if (context->use_ev_sigint)
|
||||
ev_signal_stop(context->pt[n].io_loop_ev,
|
||||
&context->pt[n].w_sigint.ev_watcher);
|
||||
if (context->options & LWS_SERVER_OPTION_LIBEV) {
|
||||
ev_io_stop(context->pt[n].io_loop_ev,
|
||||
&context->pt[n].w_accept.ev_watcher);
|
||||
if (context->use_ev_sigint)
|
||||
ev_signal_stop(context->pt[n].io_loop_ev,
|
||||
&context->pt[n].w_sigint.ev_watcher);
|
||||
}
|
||||
#endif /* LWS_USE_LIBEV */
|
||||
#ifdef LWS_USE_LIBUV
|
||||
uv_poll_stop(&context->pt[n].w_accept.uv_watcher);
|
||||
if (context->options & LWS_SERVER_OPTION_LIBUV)
|
||||
uv_poll_stop(&context->pt[n].w_accept.uv_watcher);
|
||||
#endif
|
||||
lws_free_set_NULL(context->pt[n].serv_buf);
|
||||
if (context->pt[n].ah_pool)
|
||||
|
|
Loading…
Add table
Reference in a new issue