diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-03-03 09:53:31 +0000 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-03-03 09:53:31 +0000 |
commit | 7eb65929924af50146d89192c2cf557e3bdbf07f (patch) | |
tree | aa1f9dcd0c2e036d4e00199bc84f3c053d11eb9e | |
parent | a21a66972f8733de766bc538fe81f2e0ccb57925 (diff) | |
download | pleroma-7eb65929924af50146d89192c2cf557e3bdbf07f.tar.gz |
Apply suggestion to lib/pleroma/pool/connections.ex
-rw-r--r-- | lib/pleroma/pool/connections.ex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pleroma/pool/connections.ex b/lib/pleroma/pool/connections.ex index c4c5fd66c..84617815f 100644 --- a/lib/pleroma/pool/connections.ex +++ b/lib/pleroma/pool/connections.ex @@ -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, |