mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
complain if zero ka_interval used with positive ka_time
https://github.com/warmcat/libwebsockets/issues/308 Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
f94dd2ea3e
commit
f7e2a85e11
1 changed files with 5 additions and 0 deletions
|
@ -126,6 +126,11 @@ libwebsocket_create_context(struct lws_context_creation_info *info)
|
|||
context->ka_interval = info->ka_interval;
|
||||
context->ka_probes = info->ka_probes;
|
||||
|
||||
if (!info->ka_interval && info->ka_time > 0) {
|
||||
lwsl_err("info->ka_interval can't be 0 if ka_time used\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef LWS_USE_LIBEV
|
||||
/* (Issue #264) In order to *avoid breaking backwards compatibility*, we
|
||||
* enable libev mediated SIGINT handling with a default handler of
|
||||
|
|
Loading…
Add table
Reference in a new issue