Apply suggestion to lib/pleroma/http/http.ex
authorAlexander Strizhakov <alex.strizhakov@gmail.com>
Tue, 3 Mar 2020 09:50:42 +0000 (09:50 +0000)
committerAlexander Strizhakov <alex.strizhakov@gmail.com>
Tue, 3 Mar 2020 09:50:42 +0000 (09:50 +0000)
lib/pleroma/http/http.ex

index ad47dc936f56ca60ed22705fefa2e06d79df3916..5fb468689dff3225cac695962815b47b6dffa922 100644 (file)
@@ -64,8 +64,8 @@ defmodule Pleroma.HTTP 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