context destroy just kill wsis

Signed-off-by: Andy Green <andy.green@linaro.org>
diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c
index 317a738..49e5729 100644
--- a/lib/libwebsockets.c
+++ b/lib/libwebsockets.c
@@ -52,7 +52,7 @@
 
 	old_state = wsi->state;
 
-	if (wsi->socket_is_permanently_unusable)
+	if (wsi->socket_is_permanently_unusable || reason == LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY)
 		goto just_kill_connection;
 
 	switch (old_state) {
@@ -164,7 +164,8 @@
 	 */
 
 	if (old_state == WSI_STATE_ESTABLISHED &&
-					  reason != LWS_CLOSE_STATUS_NOSTATUS) {
+	    reason != LWS_CLOSE_STATUS_NOSTATUS &&
+	    reason != LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY) {
 
 		lwsl_debug("sending close indication...\n");
 
diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h
index 064be18..c21f329 100644
--- a/lib/libwebsockets.h
+++ b/lib/libwebsockets.h
@@ -524,6 +524,8 @@
 	LWS_CLOSE_STATUS_EXTENSION_REQUIRED = 1010,
 	LWS_CLOSE_STATUS_UNEXPECTED_CONDITION = 1011,
 	LWS_CLOSE_STATUS_TLS_FAILURE = 1015,
+
+	LWS_CLOSE_STATUS_NOSTATUS_CONTEXT_DESTROY = 9999,
 };
 
 enum http_status {