mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
Don't destroy ev/uv loops if they haven't been created yet
This commit is contained in:
parent
0c3cc2efcb
commit
f84be14677
2 changed files with 6 additions and 0 deletions
|
@ -138,6 +138,9 @@ lws_libev_destroyloop(struct lws_context *context, int tsi)
|
|||
if (!(context->options & LWS_SERVER_OPTION_LIBEV))
|
||||
return;
|
||||
|
||||
if (!pt->io_loop_ev)
|
||||
return;
|
||||
|
||||
ev_io_stop(pt->io_loop_ev, &pt->w_accept.ev_watcher);
|
||||
if (context->use_ev_sigint)
|
||||
ev_signal_stop(pt->io_loop_ev,
|
||||
|
|
|
@ -124,6 +124,9 @@ lws_libuv_destroyloop(struct lws_context *context, int tsi)
|
|||
if (!(context->options & LWS_SERVER_OPTION_LIBUV))
|
||||
return;
|
||||
|
||||
if (!pt->io_loop_uv)
|
||||
return;
|
||||
|
||||
if (context->use_ev_sigint)
|
||||
uv_signal_stop(&pt->w_sigint.uv_watcher);
|
||||
for (m = 0; m < ARRAY_SIZE(sigs); m++)
|
||||
|
|
Loading…
Add table
Reference in a new issue