From 6a184115a2431727b5039c1c726a8afc5eef228c Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Fri, 23 Jun 2017 12:25:53 +0200 Subject: Longer timeouts for outgoing federation. --- lib/pleroma/web/salmon/salmon.ex | 2 +- lib/pleroma/web/websub/websub.ex | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') 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) -- cgit v1.2.3