mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
output size trimming with default rxbuf fix
5e203f78e2
accidentally
trashed the "zero rz_buffer_size means 4096" handling
for tx chunking.
Signed-off-by: Andy Green <andy@warmcat.com>
This commit is contained in:
parent
7a9970f90d
commit
fa34a82ca1
1 changed files with 2 additions and 1 deletions
|
@ -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");
|
lwsl_warn("** error invalid sock but expected to send\n");
|
||||||
|
|
||||||
/* limit sending */
|
/* limit sending */
|
||||||
n = wsi->protocol->rx_buffer_size + LWS_PRE + 4;
|
n = wsi->protocol->rx_buffer_size;
|
||||||
if (!n)
|
if (!n)
|
||||||
n = LWS_MAX_SOCKET_IO_BUF;
|
n = LWS_MAX_SOCKET_IO_BUF;
|
||||||
|
n += LWS_PRE + 4;
|
||||||
if (n > len)
|
if (n > len)
|
||||||
n = len;
|
n = len;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue