From 0f222cdc77d238430cf4708fe3ae21231f9bba96 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 15 May 2016 09:01:43 +0800 Subject: [PATCH] output size trimming with default rxbuf fix 5e203f78e21ee3313d763d8ee6d499fa0163f51a accidentally trashed the "zero rz_buffer_size means 4096" handling for tx chunking. Signed-off-by: Andy Green --- lib/output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/output.c b/lib/output.c index 656cfafb..a29cf30e 100644 --- a/lib/output.c +++ b/lib/output.c @@ -127,9 +127,10 @@ int lws_issue_raw(struct lws *wsi, unsigned char *buf, size_t len) lwsl_warn("** error invalid sock but expected to send\n"); /* limit sending */ - n = wsi->protocol->rx_buffer_size + LWS_PRE + 4; + n = wsi->protocol->rx_buffer_size; if (!n) n = LWS_MAX_SOCKET_IO_BUF; + n += LWS_PRE + 4; if (n > len) n = len;