1
0
mirror of https://github.com/janet-lang/janet synced 2024-09-29 23:40:40 +00:00

Fix adding handler to loop with fiber

This commit is contained in:
Josef Pospíšil 2020-11-10 10:32:47 +01:00
parent 69b68c0091
commit bf6eae711a

View File

@ -2739,7 +2739,7 @@
[host port &opt handler type] [host port &opt handler type]
(def s (net/listen host port type)) (def s (net/listen host port type))
(if handler (if handler
(ev/go (fn [] (net/accept-loop s handler)))) (ev/go (coro (net/accept-loop s handler))))
s)) s))
(undef guarddef) (undef guarddef)