From 3baed037c9c6f7c4ce24103b2c6c76f07008a83a Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 10 May 2016 21:37:58 +0800 Subject: [PATCH] output allow LWS_PRE+4 on top of rx_buffer_size for max send chunk https://github.com/warmcat/libwebsockets/issues/522 Signed-off-by: Andy Green --- lib/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/output.c b/lib/output.c index 3dbe8bb1..656cfafb 100644 --- a/lib/output.c +++ b/lib/output.c @@ -127,7 +127,7 @@ 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; + n = wsi->protocol->rx_buffer_size + LWS_PRE + 4; if (!n) n = LWS_MAX_SOCKET_IO_BUF; if (n > len)