aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-05-31 18:24:50 +0200
committerRoger Braun <roger@rogerbraun.net>2017-05-31 18:24:50 +0200
commit4cfe1e0c9becebbc5665eb28b187451f96c73555 (patch)
tree491b6e58bf59e80a8412b380d008628fa6cbf73b /lib
parent80705c7a204be461a5c7a4abb8c675f4482a9cd2 (diff)
downloadpleroma-4cfe1e0c9becebbc5665eb28b187451f96c73555.tar.gz
Make timeouts longer, some servers are very slow.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/ostatus/ostatus.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/ostatus/ostatus.ex b/lib/pleroma/web/ostatus/ostatus.ex
index 9300de16e..29291b7a5 100644
--- a/lib/pleroma/web/ostatus/ostatus.ex
+++ b/lib/pleroma/web/ostatus/ostatus.ex
@@ -341,9 +341,9 @@ defmodule Pleroma.Web.OStatus do
def fetch_activity_from_html_url(url) do
Logger.debug("Trying to fetch #{url}")
- with {:ok, %{body: body}} <- @httpoison.get(url, [], follow_redirect: true),
+ with {:ok, %{body: body}} <- @httpoison.get(url, [], follow_redirect: true, timeout: 10000, recv_timeout: 20000),
{:ok, atom_url} <- get_atom_url(body),
- {:ok, %{status_code: code, body: body}} when code in 200..299 <- @httpoison.get(atom_url, [], follow_redirect: true) do
+ {:ok, %{status_code: code, body: body}} when code in 200..299 <- @httpoison.get(atom_url, [], follow_redirect: true, timeout: 10000, recv_timeout: 20000) do
Logger.debug("Got document from #{url}, handling...")
handle_incoming(body)
else e -> Logger.debug("Couldn't get #{url}: #{inspect(e)}")