mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
WHOOPS! Stuck the sigint init int the wrong function.
This commit is contained in:
parent
6740b70aaf
commit
79d09fcc37
1 changed files with 12 additions and 11 deletions
|
@ -126,6 +126,18 @@ libwebsocket_create_context(struct lws_context_creation_info *info)
|
|||
context->ka_interval = info->ka_interval;
|
||||
context->ka_probes = info->ka_probes;
|
||||
|
||||
#ifdef LWS_USE_LIBEV
|
||||
/* (Issue #264) In order to *avoid breaking backwards compatibility*, we
|
||||
* enable libev mediated SIGINT handling with a default handler of
|
||||
* libwebsocket_sigint_cb. The handler can be overridden or disabled
|
||||
* by invoking libwebsocket_sigint_cfg after creating the context, but
|
||||
* before invoking libwebsocket_initloop:
|
||||
*/
|
||||
context->use_ev_sigint = 1;
|
||||
context->lws_ev_sigint_cb = &libwebsocket_sigint_cb;
|
||||
#endif /* LWS_USE_LIBEV */
|
||||
|
||||
|
||||
/* to reduce this allocation, */
|
||||
context->max_fds = getdtablesize();
|
||||
lwsl_notice(" static allocation: %u + (%u x %u fds) = %u bytes\n",
|
||||
|
@ -297,17 +309,6 @@ libwebsocket_context_destroy(struct libwebsocket_context *context)
|
|||
n--;
|
||||
}
|
||||
|
||||
#ifdef LWS_USE_LIBEV
|
||||
/* (Issue #264) In order to *avoid breaking backwards compatibility*, we
|
||||
* enable libev mediated SIGINT handling with a default handler of
|
||||
* libwebsocket_sigint_cb. The handler can be overridden or disabled
|
||||
* by invoking libwebsocket_sigint_cfg after creating the context, but
|
||||
* before invoking libwebsocket_initloop:
|
||||
*/
|
||||
context->use_ev_sigint = 1;
|
||||
context->lws_ev_sigint_cb = &libwebsocket_sigint_cb;
|
||||
#endif /* LWS_USE_LIBEV */
|
||||
|
||||
/*
|
||||
* give all extensions a chance to clean up any per-context
|
||||
* allocations they might have made
|
||||
|
|
Loading…
Add table
Reference in a new issue