http: rework connection timeouts to match hackney docs, enforce 1 second max TCP...
authorWilliam Pitcock <nenolod@dereferenced.org>
Thu, 7 Mar 2019 23:49:02 +0000 (23:49 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Fri, 8 Mar 2019 22:56:16 +0000 (22:56 +0000)
lib/pleroma/http/connection.ex
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
lib/pleroma/web/rel_me.ex
lib/pleroma/web/rich_media/parser.ex

index cc2e96e2b28302fc36af84ddc261a8567fddbbc4..926f892bab4f8b1a2e176943203a5a972613aeb9 100644 (file)
@@ -8,8 +8,8 @@ defmodule Pleroma.HTTP.Connection do
   """
 
   @hackney_options [
-    timeout: 10000,
-    recv_timeout: 20000,
+    connect_timeout: 1_000,
+    recv_timeout: 10_000,
     follow_redirect: true,
     pool: :federation
   ]
index 8c58f45450ca1d33aa8fe62f0453e01fbd9332ef..26921d3862b481f66649271240026a492b15c6c8 100644 (file)
@@ -1452,7 +1452,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
                url,
                [],
                adapter: [
-                 timeout: timeout,
                  recv_timeout: timeout,
                  pool: :default
                ]
index ab29a36e393deb27c4c1dee8c412ef11f6172a40..eaca41132a2ff240b5b9d826fd6e4d38306d5c00 100644 (file)
@@ -5,7 +5,6 @@
 defmodule Pleroma.Web.RelMe do
   @hackney_options [
     pool: :media,
-    timeout: 2_000,
     recv_timeout: 2_000,
     max_body: 2_000_000
   ]
index 4341141df8504d67ba2d5b5129dc8ff611e24e42..4bd271d8e73cd54509a900faf8df8bdfe77f4b6f 100644 (file)
@@ -11,7 +11,6 @@ defmodule Pleroma.Web.RichMedia.Parser do
 
   @hackney_options [
     pool: :media,
-    timeout: 2_000,
     recv_timeout: 2_000,
     max_body: 2_000_000
   ]