From: Andy Green Date: Mon, 11 Feb 2013 06:08:50 +0000 (+0800) Subject: valgrind dont close things directly in the callback X-Git-Tag: upstream/1.7.3~982 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=310655bf2723eb680a5fda956366d0082d16b156;p=platform%2Fupstream%2Flibwebsockets.git valgrind dont close things directly in the callback Signed-off-by: Andy Green --- 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 @@ 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);