echo: fix debug build
authorNamowen <namowen@github.invalid.com>
Thu, 15 Dec 2016 23:02:59 +0000 (07:02 +0800)
committerAndy Green <andy@warmcat.com>
Tue, 20 Dec 2016 06:37:07 +0000 (14:37 +0800)
https://github.com/warmcat/libwebsockets/issues/716#issuecomment-267377856

test-server/test-echo.c

index efb0503..f428576 100644 (file)
@@ -66,6 +66,11 @@ callback_echo(struct lws *wsi, enum lws_callback_reasons reason, void *user,
 
 #ifndef LWS_NO_SERVER
 
+       case LWS_CALLBACK_ESTABLISHED:
+               pss->index = 0;
+               pss->len = -1;
+               break;
+
        case LWS_CALLBACK_SERVER_WRITEABLE:
 do_tx: