aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/websub/websub.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/websub/websub.ex')
-rw-r--r--lib/pleroma/web/websub/websub.ex6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pleroma/web/websub/websub.ex b/lib/pleroma/web/websub/websub.ex
index db1577a93..41bdffb5b 100644
--- a/lib/pleroma/web/websub/websub.ex
+++ b/lib/pleroma/web/websub/websub.ex
@@ -142,7 +142,11 @@ defmodule Pleroma.Web.Websub do
requester.(subscription)
end
- def gather_feed_data(topic, getter \\ &@httpoison.get/1) do
+ def long_get(url) do
+ @httpoison.get(url, [], timeout: 10_000, recv_timeout: 20_000)
+ end
+
+ def gather_feed_data(topic, getter \\ &long_get/1) do
with {:ok, response} <- getter.(topic),
status_code when status_code in 200..299 <- response.status_code,
body <- response.body,