Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cljs-http starts looping when providing custom channel #66

Open
fluke777 opened this issue Jul 19, 2015 · 3 comments
Open

cljs-http starts looping when providing custom channel #66

fluke777 opened this issue Jul 19, 2015 · 3 comments

Comments

@fluke777
Copy link

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"]

@profil
Copy link

profil commented Jan 1, 2016

Seing the same behaviour with [cljs-http "0.1.39"].

@r0man
Copy link
Owner

r0man commented Jan 2, 2016

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" notifications@github.com
wrote:

Seing the same behaviour with [cljs-http "0.1.39"].


Reply to this email directly or view it on GitHub
#66 (comment).

@kirahowe
Copy link

I ran into this as well on v 0.1.46. Wondering if anyone found a workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants