diff --git a/lib/core-net/close.c b/lib/core-net/close.c index 41645632f..fe1af3c51 100644 --- a/lib/core-net/close.c +++ b/lib/core-net/close.c @@ -1077,6 +1077,10 @@ lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason, const char *ca struct lws_context *cx = wsi->a.context; struct lws_context_per_thread *pt = &wsi->a.context->pt[(int)wsi->tsi]; + /* if the user sets the sniffing flag, populate the key log file */ + lws_set_keylog_file(wsi); + + /* if the user sets the sniffing flag, populate the key log file */ lws_set_keylog_file(wsi); diff --git a/lib/core/private-lib-core.h b/lib/core/private-lib-core.h index a138e4430..050d62f48 100644 --- a/lib/core/private-lib-core.h +++ b/lib/core/private-lib-core.h @@ -27,7 +27,8 @@ #include "lws_config.h" #include "lws_config_private.h" - +#include +#include #if defined(LWS_WITH_CGI) && defined(LWS_HAVE_VFORK) && \ !defined(NO_GNU_SOURCE_THIS_TIME) && !defined(_GNU_SOURCE) diff --git a/lib/plat/windows/windows-init.c b/lib/plat/windows/windows-init.c index f5883ad2f..381ce75be 100644 --- a/lib/plat/windows/windows-init.c +++ b/lib/plat/windows/windows-init.c @@ -108,10 +108,8 @@ lws_plat_init(struct lws_context *context, defined(LWS_WITH_TLS) && defined(LWS_WITH_CLIENT) { char *klf_env = getenv("SSLKEYLOGFILE"); - - if (klf_env) - lws_strncpy(context->keylog_file, klf_env, - sizeof(context->keylog_file)); + if(klf_env) + lws_strncpy(context->keylog_file, klf_env, sizeof(context->keylog_file)); } #endif