aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-06-23 12:25:53 +0200
committerRoger Braun <roger@rogerbraun.net>2017-06-23 12:25:53 +0200
commit6a184115a2431727b5039c1c726a8afc5eef228c (patch)
tree8383604368d7081dcde76f55c105b1a56da7e528 /lib
parent42633406b333b26e5b364cdd2c93899a0d6d0bad (diff)
downloadpleroma-6a184115a2431727b5039c1c726a8afc5eef228c.tar.gz
Longer timeouts for outgoing federation.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/salmon/salmon.ex2
-rw-r--r--lib/pleroma/web/websub/websub.ex6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/pleroma/web/salmon/salmon.ex b/lib/pleroma/web/salmon/salmon.ex
index b4f81b4ed..e2eff857f 100644
--- a/lib/pleroma/web/salmon/salmon.ex
+++ b/lib/pleroma/web/salmon/salmon.ex
@@ -132,7 +132,7 @@ defmodule Pleroma.Web.Salmon do
end
defp send_to_user(%{info: %{"salmon" => salmon}}, feed, poster) do
- poster.(salmon, feed, [{"Content-Type", "application/magic-envelope+xml"}])
+ poster.(salmon, feed, [{"Content-Type", "application/magic-envelope+xml"}], timeout: 10000, recv_timeout: 20000)
end
defp send_to_user(_,_,_), do: nil
diff --git a/lib/pleroma/web/websub/websub.ex b/lib/pleroma/web/websub/websub.ex
index 410303b77..a5309ebd9 100644
--- a/lib/pleroma/web/websub/websub.ex
+++ b/lib/pleroma/web/websub/websub.ex
@@ -54,9 +54,9 @@ defmodule Pleroma.Web.Websub do
Task.start(fn ->
with {:ok, %{status_code: code}} <- @httpoison.post(sub.callback, response, [
- {"Content-Type", "application/atom+xml"},
- {"X-Hub-Signature", "sha1=#{signature}"}
- ]) do
+ {"Content-Type", "application/atom+xml"},
+ {"X-Hub-Signature", "sha1=#{signature}"}
+ ], timeout: 10000, recv_timeout: 20000) do
Logger.debug(fn -> "Pushed to #{sub.callback}, code #{code}" end)
else e ->
Logger.debug(fn -> "Couldn't push to #{sub.callback}, #{inspect(e)}" end)