From d8383ca5fc9a868e70c7c307bf7f8f04a24b10ab Mon Sep 17 00:00:00 2001 From: gaby64 Date: Tue, 22 Dec 2015 12:41:12 +0800 Subject: [PATCH] libev context destroy https://github.com/warmcat/libwebsockets/issues/380 --- lib/context.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/context.c b/lib/context.c index 7c73c4b8..cb0fbbf1 100644 --- a/lib/context.c +++ b/lib/context.c @@ -302,6 +302,11 @@ lws_context_destroy(struct lws_context *context) protocol++; } } +#ifdef LWS_USE_LIBEV + ev_io_stop(context->io_loop, &context->w_accept.watcher); + if(context->use_ev_sigint) + ev_signal_stop(context->io_loop, &context->w_sigint.watcher); +#endif /* LWS_USE_LIBEV */ lws_plat_context_early_destroy(context); lws_ssl_context_destroy(context);