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

index c4c5fd66c20785d23bb0ed66e7e2b8ce2e6a1ecf..84617815fa2c3580c3d099d6dccd46cc8d79ad84 100644 (file)
@@ -180,10 +180,10 @@ defmodule Pleroma.Pool.Connections do
     state =
       with conn_key when is_binary(conn_key) <- compose_key_gun_info(conn_pid),
            {key, conn} <- find_conn(state.conns, conn_pid, conn_key),
-           {true, key} <- {Process.alive?(conn_pid), key},
-           time <- :os.system_time(:second),
-           last_reference <- time - conn.last_reference,
-           current_crf <- crf(last_reference, 100, conn.crf) do
+           {true, key} <- {Process.alive?(conn_pid), key} do
+        time = :os.system_time(:second)
+        last_reference = time - conn.last_reference
+        current_crf = crf(last_reference, 100, conn.crf)
         put_in(state.conns[key], %{
           conn
           | gun_state: :up,