valgrind context destroy close all conns properly
Signed-off-by: Andy Green <andy.green@linaro.org>
diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c
index 6b1e217..e5d148a 100644
--- a/lib/libwebsockets.c
+++ b/lib/libwebsockets.c
@@ -1050,7 +1050,8 @@
for (n = 0; n < context->fds_count; n++) {
struct libwebsocket *wsi = context->lws_lookup[context->fds[n].fd];
libwebsocket_close_and_free_session(context,
- wsi, LWS_CLOSE_STATUS_GOINGAWAY);
+ wsi, LWS_CLOSE_STATUS_NOSTATUS /* no protocol close */);
+ n--;
}
/*