From db761be972dbeb8a9d5f96d7181860c887bd668b Mon Sep 17 00:00:00 2001 From: "Niall T. Davidson" Date: Sat, 29 Jun 2013 10:16:18 +0800 Subject: [PATCH] Added additional LWS_CALLBACK_CLOSED_HTTP callback to just_kill_connection branch of close_and_free_session --- lib/libwebsockets.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index e75a5100..661876ed 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -370,6 +370,10 @@ just_kill_connection: lwsl_debug("calling back CLOSED\n"); wsi->protocol->callback(context, wsi, LWS_CALLBACK_CLOSED, wsi->user_space, NULL, 0); + } else if ( wsi->mode == LWS_CONNMODE_HTTP_SERVING_ACCEPTED ) { + lwsl_debug("calling back CLOSED_HTTP\n"); + context->protocols[0].callback(context, wsi, + LWS_CALLBACK_CLOSED_HTTP, wsi->user_space, NULL, 0 ); } else lwsl_debug("not calling back closed\n");