Uncaught exception in :error function hangs http/await #52

Closed
candera opened this Issue Mar 22, 2013 · 2 comments

Comments

Projects
None yet
3 participants

candera commented Mar 22, 2013

This code hangs forever:

(let [client (http/create-client :request-timeout 1500
                                 :connection-timeout 1000)
      req (http-request/prepare-request
           :get "http://nosuch.server/")
      resp (http-request/execute-request
            client
            req
            :error (fn [_ _] (throw (Exception. "boom!"))))]
  (http/await resp))

It appears that the exception in the :error function eliminates any chance of the underlying promise ever being delivered. It would be nice if http.async.client would protect against bugs in the :error function.

neotyk was assigned Mar 24, 2013

neotyk closed this in 674cc46 Mar 24, 2013

Collaborator

neotyk commented Mar 24, 2013

Thanks for the bug report.
I've pushed v0.5.3-SNAPSHOT to clojars.
Please test it and let me know if it works for you.

neotyk reopened this Mar 24, 2013

Owner

cch1 commented Jun 24, 2015

This bug is fixed in version 0.5.3 and later.

cch1 closed this Jun 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment