From bf6eae711af5da8c66e3073ab32ebdb900a85ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Pospi=CC=81s=CC=8Cil?= Date: Tue, 10 Nov 2020 10:32:47 +0100 Subject: [PATCH 1/2] Fix adding handler to loop with fiber --- src/boot/boot.janet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot/boot.janet b/src/boot/boot.janet index bf7f2543..afab0559 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -2739,7 +2739,7 @@ [host port &opt handler type] (def s (net/listen host port type)) (if handler - (ev/go (fn [] (net/accept-loop s handler)))) + (ev/go (coro (net/accept-loop s handler)))) s)) (undef guarddef) From 2be09790a983cb8b31928166f904783e2442abda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Pospi=CC=81s=CC=8Cil?= Date: Tue, 10 Nov 2020 10:39:33 +0100 Subject: [PATCH 2/2] Change fix with ev/call --- src/boot/boot.janet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot/boot.janet b/src/boot/boot.janet index afab0559..03d0a0e5 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -2739,7 +2739,7 @@ [host port &opt handler type] (def s (net/listen host port type)) (if handler - (ev/go (coro (net/accept-loop s handler)))) + (ev/call (fn [] (net/accept-loop s handler)))) s)) (undef guarddef)