Skip to content
Snippets Groups Projects
Commit e70c63ba authored by Andy Green's avatar Andy Green
Browse files

context protocol destroy provide nonnull wsi with context

parent 77ec61e4
Branches
Tags
No related merge requests found
......@@ -253,6 +253,7 @@ LWS_VISIBLE void
lws_context_destroy(struct lws_context *context)
{
const struct lws_protocols *protocol = NULL;
struct lws wsi;
int n;
lwsl_notice("%s\n", __func__);
......@@ -260,6 +261,9 @@ lws_context_destroy(struct lws_context *context)
if (!context)
return;
memset(&wsi, 0, sizeof(wsi));
wsi.context = context;
#ifdef LWS_LATENCY
if (context->worst_latency_info[0])
lwsl_notice("Worst latency: %s\n", context->worst_latency_info);
......@@ -292,7 +296,7 @@ lws_context_destroy(struct lws_context *context)
protocol = context->protocols;
if (protocol) {
while (protocol->callback) {
protocol->callback(NULL,
protocol->callback(&wsi,
LWS_CALLBACK_PROTOCOL_DESTROY,
NULL, NULL, 0);
protocol++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment