valgrind dont close things directly in the callback
Signed-off-by: Andy Green <andy.green@linaro.org>
diff --git a/test-server/test-client.c b/test-server/test-client.c
index 3d98879..7b36de9 100644
--- a/test-server/test-client.c
+++ b/test-server/test-client.c
@@ -150,8 +150,7 @@
mirror_lifetime--;
if (!mirror_lifetime) {
fprintf(stderr, "closing mirror session\n");
- libwebsocket_close_and_free_session(context,
- wsi_mirror, LWS_CLOSE_STATUS_GOINGAWAY);
+ return -1;
} else
/* get notified as soon as we can write again */
libwebsocket_callback_on_writable(context, wsi);