aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-04-30 17:09:08 +0200
committerLoïc Hoguin <[email protected]>2017-04-30 17:09:08 +0200
commite56fa6e8d6e99a0385977acee500193e04fc2a83 (patch)
tree3e3384c8c469eeeed1cba95b6897a69ed378473d
parent64009f92438bc658e298ae486234b5b1e5fed541 (diff)
downloadgun-e56fa6e8d6e99a0385977acee500193e04fc2a83.tar.gz
gun-e56fa6e8d6e99a0385977acee500193e04fc2a83.tar.bz2
gun-e56fa6e8d6e99a0385977acee500193e04fc2a83.zip
Allow infinity for connect_timeout
-rw-r--r--src/gun.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gun.erl b/src/gun.erl
index 011190c..4304299 100644
--- a/src/gun.erl
+++ b/src/gun.erl
@@ -135,6 +135,8 @@ open(Host, Port, Opts) when is_list(Host); is_atom(Host) ->
check_options([]) ->
ok;
+check_options([{connect_timeout, infinity}|Opts]) ->
+ check_options(Opts);
check_options([{connect_timeout, T}|Opts]) when is_integer(T), T >= 0 ->
check_options(Opts);
check_options([{http_opts, ProtoOpts}|Opts]) when is_map(ProtoOpts) ->