From 784231a6429f2832ef04a255fbf7264392f9e692 Mon Sep 17 00:00:00 2001 From: gaby64 Date: Fri, 29 Jan 2016 08:40:11 +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 f874f08d8..d11203875 100644 --- a/lib/context.c +++ b/lib/context.c @@ -304,6 +304,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);