From 20db310908afe01ec7ca2d32c766bf8edd7b6ded Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 28 Dec 2015 11:11:55 +0800 Subject: [PATCH] autobahn requires zero length rx allowed We suppress zero length rx from getting to userland, but autobahn requires it... oh well. Signed-off-by: Andy Green --- lib/client-parser.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/client-parser.c b/lib/client-parser.c index 90f9107a..12096a43 100644 --- a/lib/client-parser.c +++ b/lib/client-parser.c @@ -383,12 +383,11 @@ ping_drop: LWS_SEND_BUFFER_PRE_PADDING]; eff_buf.token_len = wsi->u.ws.rx_user_buffer_head; - if (lws_ext_cb_wsi_active_exts(wsi, - LWS_EXT_CALLBACK_PAYLOAD_RX, - &eff_buf, 0) < 0) /* fail */ + if (lws_ext_cb_wsi_active_exts(wsi, LWS_EXT_CALLBACK_PAYLOAD_RX, + &eff_buf, 0) < 0) /* fail */ return -1; - if (eff_buf.token_len <= 0 && + if (eff_buf.token_len < 0 && callback_action != LWS_CALLBACK_CLIENT_RECEIVE_PONG) goto already_done;