http: enable keepalive / connection pooling (closes #336)
authorWilliam Pitcock <nenolod@dereferenced.org>
Fri, 26 Oct 2018 03:06:42 +0000 (03:06 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Fri, 26 Oct 2018 03:06:42 +0000 (03:06 +0000)
lib/pleroma/http/http.ex

index c19bccf607872d98886c1489924b7a421e897c40..f222e1774c9253224b97ca7a642a940b79554a57 100644 (file)
@@ -19,9 +19,10 @@ defmodule Pleroma.HTTP do
     end
   end
 
-  def process_request_options(options) do
+  defp process_request_options(options) do
     config = Application.get_env(:pleroma, :http, [])
     proxy = Keyword.get(config, :proxy_url, nil)
+    options = options ++ [hackney: [pool: :default]]
 
     case proxy do
       nil -> options