Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added connect timeout; thanks cmoscoso!

  • Loading branch information...
commit 6f0bbb4d671abf077771863aeb1d45a955c7a02d 1 parent cb052ed
Phil Hagelberg authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  src/clojure/http/client.clj
3  src/clojure/http/client.clj
@@ -11,6 +11,8 @@
" (+"),
"Connection" "close"})
+(def *connect-timeout* 0)
(defn set-system-proxy!
"Java's HttpURLConnection cannot do per-request proxying. Instead,
system properties are used. This function mutates the global setting.
@@ -109,6 +111,7 @@ by a server."
method (.toUpperCase #^String (as-str (or method
(.setRequestMethod connection method)
+ (.setConnectTimeout connection *connect-timeout*)
(doseq [[header value] (conj default-headers (or headers {}))]
;; Treat Cookie specially -- see below.
Please sign in to comment.
Something went wrong with that request. Please try again.