Skip to content

Commit

Permalink
avoid adding nil to chan
Browse files Browse the repository at this point in the history
  • Loading branch information
fogus committed Jan 16, 2025
1 parent ffa73a9 commit bb7186c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/clojure/clojure/core/async.clj
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ to catch and handle."
(Var/resetThreadBindingFrame captured-bindings#)
(try
(let [result# (do ~@body)]
(>!! c# result#))
(when-not (nil? result#)
(>!! c# result#)))
(finally
(close! c#)))))
c#))
Expand Down

0 comments on commit bb7186c

Please sign in to comment.