1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-27 13:47:42 +00:00

Add more network and subprocess testing with redirection.

This commit is contained in:
Calvin Rose
2021-01-11 18:32:56 -06:00
parent bf01bf631d
commit 5e1a8c86f9
3 changed files with 50 additions and 8 deletions

View File

@@ -529,7 +529,7 @@ static Janet cfun_stream_read(int32_t argc, Janet *argv) {
double to = janet_optnumber(argv, argc, 3, INFINITY);
if (janet_keyeq(argv[1], "all")) {
if (to != INFINITY) janet_addtimeout(to);
janet_ev_recvchunk(stream, buffer, -1, MSG_NOSIGNAL);
janet_ev_recvchunk(stream, buffer, INT32_MAX, MSG_NOSIGNAL);
} else {
int32_t n = janet_getnat(argv, 1);
if (to != INFINITY) janet_addtimeout(to);