cljs-http starts looping when providing custom channel
Not sure if I am not using it correctly or this is a bug.
When I write this simple program
(def c (async/chan))
(go (while true
(prn (async/<! c))))
(go
(let [resp (async/<! (http/get "some_api" {:accept "application/json"}))]
(async/>! c resp)))
Everything works fine. But when I run this one
(def c (async/chan))
(go (while true
(prn (async/<! c))))
(go
(http/get "some_api" {:accept "application/json" :channel c}))
everything goes awry. Tons of nils are printed to the console and it never stops. I would have thought these two are meant to be equivalent?
Running on [cljs-http "0.1.35"]
Seing the same behaviour with [cljs-http "0.1.39"].
Hi Daniel, I'm in Sri Lanka at the moment and AFK for the next 4 weeks. I can take a look at this when I am back. Sorry, Roman. On 2 Jan 2016 12:52 am, "Daniel Pettersson" [email protected] wrote:
Seing the same behaviour with [cljs-http "0.1.39"].
— Reply to this email directly or view it on GitHub https://github.com/r0man/cljs-http/issues/66#issuecomment-168333040.
I ran into this as well on v 0.1.46. Wondering if anyone found a workaround?