fix httpoison config bug
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/lib/ex_ovh/config.ex b/lib/ex_ovh/config.ex
index 4c519e6..01cea6a 100644
--- a/lib/ex_ovh/config.ex
+++ b/lib/ex_ovh/config.ex
@@ -78,9 +78,18 @@ defmodule ExOvh.Config do
diff = calculate_diff(client, otp_app)
ovh_config = get_ovh_config_from_env(client, otp_app)
|> Keyword.put(:diff, diff)
+
+ httpoison_config = get_httpoison_config_from_env(client, otp_app)
+ connect_timeout = httpoison_config[:connect_timeout] || 30000 # 30 seconds
+ receive_timeout = httpoison_config[:receive_timeout] || (60000 * 30) # 30 minutes
+
[
ovh: ovh_config,
- httpoison: get_httpoison_config_from_env(client, otp_app)
+ httpoison:
+ [
+ timeout: connect_timeout,
+ recv_timeout: receive_timeout,
+ ]
]
end
diff --git a/mix.exs b/mix.exs
index 14e6c82..e56569c 100644
--- a/mix.exs
+++ b/mix.exs
@@ -39,7 +39,7 @@ defmodule ExOvh.Mixfile do
defp description() do
~s"""
- An elixir client library for easier use of the [OVH API](https://api.ovh.com/console/).
+ An elixir client library for the OVH API.
"""
end