diff --git a/lib/context.c b/lib/context.c index fbf5b2f5..6ac24400 100644 --- a/lib/context.c +++ b/lib/context.c @@ -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