mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
raw-skt: don't read more than rx_buffer_size
When other roles like ws reading data, they follow `rx_buffer_size`, then fallback to context's `pt_serv_buf_size`. However, `raw-skt` don't follow `rx_buffer_size`, always use 0, then fallback to `pt_serv_buf_size`. This PR make `raw-skt` don't read more than `rx_buffer_size` data.
This commit is contained in:
parent
e38e85e71f
commit
992f40c7a1
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ rops_handle_POLLIN_raw_skt(struct lws_context_per_thread *pt, struct lws *wsi,
|
|||
#endif
|
||||
default:
|
||||
ebuf.token = NULL;
|
||||
ebuf.len = 0;
|
||||
ebuf.len = (int) wsi->a.protocol->rx_buffer_size;
|
||||
|
||||
buffered = lws_buflist_aware_read(pt, wsi, &ebuf, 1, __func__);
|
||||
switch (ebuf.len) {
|
||||
|
|
Loading…
Add table
Reference in a new issue