aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/clojure/clojure/contrib/http/agent.clj4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/clojure/clojure/contrib/http/agent.clj b/src/main/clojure/clojure/contrib/http/agent.clj
index edae6f96..937aadc0 100644
--- a/src/main/clojure/clojure/contrib/http/agent.clj
+++ b/src/main/clojure/clojure/contrib/http/agent.clj
@@ -79,6 +79,10 @@
"Sets the instance method, redirect behavior, and request headers of
the HttpURLConnection."
[#^HttpURLConnection conn options]
+ (when-let [t (:connect-timeout options)]
+ (.setConnectTimeout conn t))
+ (when-let [t (:read-timeout options)]
+ (.setReadTimeout conn t))
(.setRequestMethod conn (:method options))
(.setInstanceFollowRedirects conn (:follow-redirects options))
(doseq [[name value] (:headers options)]