1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-18 02:49:18 +00:00

Apply suggestion to lib/pleroma/http/http.ex

This commit is contained in:
Alexander Strizhakov 2020-03-03 09:50:42 +00:00
parent d30ff35d94
commit 614e3934f9

View file

@ -64,8 +64,8 @@ def request(method, url, body, headers, options) when is_binary(url) do
client <- Tesla.client([Tesla.Middleware.FollowRedirects], tesla_adapter()),
pid <- Process.whereis(adapter_opts[:pool]) do
pool_alive? =
if tesla_adapter() == Tesla.Adapter.Gun do
if pid, do: Process.alive?(pid), else: false
if tesla_adapter() == Tesla.Adapter.Gun && pid do
Process.alive?(pid)
else
false
end