mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
cgi: call init_destroy even though not on available roles list
cgi is a role, but it's not an externally-selectable role... it's only used when the mount indicates it should be. That means it's not in the list of EVERY_AVAILABLE_ROLE... make sure its zombie child reaping timer is started at context creation and stopped at destruction.
This commit is contained in:
parent
da2d585583
commit
6f7051920a
1 changed files with 8 additions and 0 deletions
|
@ -509,6 +509,10 @@ lws_create_context(const struct lws_context_creation_info *info)
|
|||
ar->pt_init_destroy(context, info,
|
||||
&context->pt[n], 0);
|
||||
} LWS_FOR_EVERY_AVAILABLE_ROLE_END;
|
||||
|
||||
#if defined(LWS_WITH_CGI)
|
||||
role_ops_cgi.pt_init_destroy(context, info, &context->pt[n], 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
lwsl_info(" Threads: %d each %d fds\n", context->count_threads,
|
||||
|
@ -837,6 +841,10 @@ lws_context_destroy3(struct lws_context *context)
|
|||
ar->pt_init_destroy(context, NULL, pt, 1);
|
||||
} LWS_FOR_EVERY_AVAILABLE_ROLE_END;
|
||||
|
||||
#if defined(LWS_WITH_CGI)
|
||||
role_ops_cgi.pt_init_destroy(context, NULL, pt, 1);
|
||||
#endif
|
||||
|
||||
if (context->event_loop_ops->destroy_pt)
|
||||
context->event_loop_ops->destroy_pt(context, n);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue