Merge branch 'fix/theora-detection-read-bytes' into 'develop'
[akkoma] / lib / pleroma / http / connection.ex
index f64d4e18e2f35750cbfbc1baed4a3a512e2050b4..7b11060b25d0b4366798a90e7fd507cd37ef92bc 100644 (file)
@@ -1,5 +1,14 @@
 defmodule Pleroma.HTTP.Connection do
-  @hackney_options [pool: :default]
+  @moduledoc """
+  Connection for http-requests.
+  """
+
+  @hackney_options [
+    pool: :default,
+    timeout: 10000,
+    recv_timeout: 20000,
+    follow_redirect: true
+  ]
   @adapter Application.get_env(:tesla, :adapter)
 
   @doc """
@@ -16,7 +25,7 @@ defmodule Pleroma.HTTP.Connection do
 
   # fetch Hackney options
   #
-  defp hackney_options(opts \\ []) do
+  defp hackney_options(opts) do
     options = Keyword.get(opts, :adapter, [])
     @hackney_options ++ options
   end