1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-23 06:50:26 +00:00
This commit is contained in:
Calvin Rose 2023-12-31 18:36:22 -06:00
parent 9eeefbd79a
commit be11a2a1ad

View File

@ -821,6 +821,7 @@ JANET_CORE_FN(cfun_stream_accept_loop,
JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
janet_stream_flags(stream, JANET_STREAM_ACCEPTABLE | JANET_STREAM_SOCKET);
JanetFunction *fun = janet_getfunction(argv, 1);
if (fun->def->min_arity < 1) janet_panic("handler function must take at least 1 argument");
janet_sched_accept(stream, fun);
}