mirror of
https://github.com/janet-lang/janet
synced 2024-12-26 08:20:27 +00:00
Remove accidental limit on max read size.
This commit is contained in:
parent
033c6f1fdb
commit
4fd7470bbf
@ -2235,7 +2235,7 @@ JanetAsyncStatus ev_machine_read(JanetListenerState *s, JanetAsyncEvent event) {
|
||||
case JANET_ASYNC_EVENT_READ: {
|
||||
JanetBuffer *buffer = state->buf;
|
||||
int32_t bytes_left = state->bytes_left;
|
||||
int32_t read_limit = bytes_left > 4096 ? 4096 : bytes_left;
|
||||
int32_t read_limit = state->is_chunk ? (bytes_left > 4096 ? 4096 : bytes_left) : bytes_left;
|
||||
janet_buffer_extra(buffer, read_limit);
|
||||
ssize_t nread;
|
||||
#ifdef JANET_NET
|
||||
|
Loading…
Reference in New Issue
Block a user