http: rework connection timeouts to match hackney docs, enforce 1 second max TCP connection timeout
This commit is contained in:
parent
773f532b14
commit
19afd9f81f
|
@ -8,8 +8,8 @@ defmodule Pleroma.HTTP.Connection do
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@hackney_options [
|
@hackney_options [
|
||||||
timeout: 10000,
|
connect_timeout: 1_000,
|
||||||
recv_timeout: 20000,
|
recv_timeout: 10_000,
|
||||||
follow_redirect: true,
|
follow_redirect: true,
|
||||||
pool: :federation
|
pool: :federation
|
||||||
]
|
]
|
||||||
|
|
|
@ -1452,7 +1452,6 @@ def suggestions(%{assigns: %{user: user}} = conn, _) do
|
||||||
url,
|
url,
|
||||||
[],
|
[],
|
||||||
adapter: [
|
adapter: [
|
||||||
timeout: timeout,
|
|
||||||
recv_timeout: timeout,
|
recv_timeout: timeout,
|
||||||
pool: :default
|
pool: :default
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
defmodule Pleroma.Web.RelMe do
|
defmodule Pleroma.Web.RelMe do
|
||||||
@hackney_options [
|
@hackney_options [
|
||||||
pool: :media,
|
pool: :media,
|
||||||
timeout: 2_000,
|
|
||||||
recv_timeout: 2_000,
|
recv_timeout: 2_000,
|
||||||
max_body: 2_000_000
|
max_body: 2_000_000
|
||||||
]
|
]
|
||||||
|
|
|
@ -11,7 +11,6 @@ defmodule Pleroma.Web.RichMedia.Parser do
|
||||||
|
|
||||||
@hackney_options [
|
@hackney_options [
|
||||||
pool: :media,
|
pool: :media,
|
||||||
timeout: 2_000,
|
|
||||||
recv_timeout: 2_000,
|
recv_timeout: 2_000,
|
||||||
max_body: 2_000_000
|
max_body: 2_000_000
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue