Commit 5afe94db4c16c2238c4e1763e022bce826ceb006

Stephen Moloney 2016-06-08T18:21:09

fix httpoison config bug

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