From 310655bf2723eb680a5fda956366d0082d16b156 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 11 Feb 2013 14:08:50 +0800 Subject: [PATCH] valgrind dont close things directly in the callback Signed-off-by: Andy Green --- test-server/test-client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test-server/test-client.c b/test-server/test-client.c index 3d988796..7b36de9f 100644 --- a/test-server/test-client.c +++ b/test-server/test-client.c @@ -150,8 +150,7 @@ callback_lws_mirror(struct libwebsocket_context *context, 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);