Skip to content

Commit bb7186c

Browse files
committed
avoid adding nil to chan
1 parent ffa73a9 commit bb7186c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/clojure/clojure/core/async.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,8 @@ to catch and handle."
491491
(Var/resetThreadBindingFrame captured-bindings#)
492492
(try
493493
(let [result# (do ~@body)]
494-
(>!! c# result#))
494+
(when-not (nil? result#)
495+
(>!! c# result#)))
495496
(finally
496497
(close! c#)))))
497498
c#))

0 commit comments

Comments
 (0)