libev set foreign loop properly
authorAndy Green <andy.green@linaro.org>
Tue, 8 Mar 2016 23:44:49 +0000 (07:44 +0800)
committerAndy Green <andy.green@linaro.org>
Tue, 8 Mar 2016 23:44:49 +0000 (07:44 +0800)
After gaby64

https://github.com/warmcat/libwebsockets/issues/455

Signed-off-by: Andy Green <andy.green@linaro.org>
lib/libev.c

index 43c53d9..8b33ed7 100644 (file)
@@ -84,6 +84,8 @@ lws_ev_initloop(struct lws_context *context, struct ev_loop *loop, int tsi)
 
        if (!loop)
                loop = ev_loop_new(0);
+       else
+               context->pt[tsi].ev_loop_foreign = 1;
 
        context->pt[tsi].io_loop_ev = loop;