Permalink
Browse files

ASYNC-56: Pubs fail (in CLJS only) if there are no subscribers for a

topic

copied over missing nil check
  • Loading branch information...
1 parent 2e5ddb9 commit ca148ebf812576b9eaa777adac6927ac22349a62 @swannodette swannodette committed Feb 19, 2014
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/clojure/cljs/core/async.cljs
@@ -643,8 +643,9 @@
(close! (muxch* m)))
(let [topic (topic-fn val)
m (get @mults topic)]
- (when-not (>! (muxch* m) val)
- (swap! mults dissoc topic))
+ (when m
+ (when-not (>! (muxch* m) val)
+ (swap! mults dissoc topic)))
(recur)))))
p)))

0 comments on commit ca148eb

Please sign in to comment.