valgrind dont close things directly in the callback
authorAndy Green <andy.green@linaro.org>
Mon, 11 Feb 2013 06:08:50 +0000 (14:08 +0800)
committerAndy Green <andy.green@linaro.org>
Mon, 11 Feb 2013 06:08:50 +0000 (14:08 +0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
test-server/test-client.c

index 3d98879..7b36de9 100644 (file)
@@ -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);