Kevin Archie <karc...@wustl.edu> writes:

> I'm trying to use http.async.client to do a PUT request (where I don't
> care about the response) and my code is hanging -- apparently after
> succesfully completing the PUT, from the server's perspective.
>
> This isn't quite what I'm doing, but exhibits the same behavior:
>
> (require '[http.async.client :as c])
> (c/with-client {} (c/PUT "http://any-site.com"; :body "test"))
>
> When I try this against any URL (valid and accepting PUT, valid but
> not accepting PUT, nonexistent), the call doesn't complete. Is there
> something I'm doing wrong?
>
> I've tried using a variety of permutations c/await and c/string on the
> returned request object and get essentially the same behavior. I'm
> getting the impression that there's some bit of laziness that doesn't
> complete, and that the close won't return until it's done, but I may
> be mistaken.

I've been bitten by it myself:
http://groups.google.com/group/clojure/browse_thread/thread/5897b14edd4b5fcd/8ab69eb27100ce17

As far as I understand this problem, there is created another client
regardless of "c/with-client", which you need to close explicitly yourself.
So you need to *always* add "c/close" to your code.

HTH,
Rob

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to