Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lws_context_destroy libev stop #380

Closed
gaby64 opened this issue Dec 22, 2015 · 1 comment
Closed

lws_context_destroy libev stop #380

gaby64 opened this issue Dec 22, 2015 · 1 comment

Comments

@gaby64
Copy link
Contributor

gaby64 commented Dec 22, 2015

i have my own signal handler,
ev_break wont work untill all watchers have been stopped

diff --git a/lib/context.c b/lib/context.c
index 7c73c4b..d377ae1 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);
lws-team pushed a commit that referenced this issue Dec 22, 2015
@lws-team
Copy link
Member

It's pushed, thanks.

lws-team pushed a commit that referenced this issue Jan 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants