Use connection pools.

This commit is contained in:
lain 2018-03-19 17:42:09 +01:00
commit ec83175100
5 changed files with 9 additions and 5 deletions

View file

@ -96,7 +96,7 @@ defmodule Pleroma.Web.Federator do
with {:ok, %{status_code: code}} <- @httpoison.post(callback, xml, [
{"Content-Type", "application/atom+xml"},
{"X-Hub-Signature", "sha1=#{signature}"}
], timeout: 10000, recv_timeout: 20000) do
], timeout: 10000, recv_timeout: 20000, hackney: [pool: :default]) do
Logger.debug(fn -> "Pushed to #{callback}, code #{code}" end)
else e ->
Logger.debug(fn -> "Couldn't push to #{callback}, #{inspect(e)}" end)