commit 38d194e8d9030f560369df57c23d56514bba16fb
parent 08df969b398e63e0a734eac52eb70618befbe7d6
Author: srfsh <dev@srf.sh>
Date: Wed, 6 Jul 2022 15:17:26 +0200
restroom: fix incorrect calculation of timeout times
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/zenflows/restroom.ex b/src/zenflows/restroom.ex
@@ -32,8 +32,8 @@ defp exec(name, data) do
url = to_charlist("http://#{host()}/api/#{name}")
hdrs = [{'user-agent', useragent()}]
http_opts = [
- {:timeout, 3000}, # 30 seconds
- {:connect_timeout, 500}, # 5 seconds
+ {:timeout, 30000}, # 30 seconds
+ {:connect_timeout, 5000}, # 5 seconds
{:autoredirect, false},
]
with {:ok, data} <- Jason.encode(%{data: data}),