From 967d6732d436c9106f0b86927a2d511fe3ba086f Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sun, 18 Aug 2019 22:42:55 +0000 Subject: [PATCH] gun: connection: fix up a comment pointed out by credo --- lib/pleroma/gun/connections.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/gun/connections.ex b/lib/pleroma/gun/connections.ex index a3f1b0351..336306ce8 100644 --- a/lib/pleroma/gun/connections.ex +++ b/lib/pleroma/gun/connections.ex @@ -114,7 +114,9 @@ defmodule Pleroma.Gun.Connections do def handle_info({:gun_down, conn_pid, _protocol, _reason, _killed, _unprocessed}, state) do {key, conn} = find_conn(state.conns, conn_pid) - # We don't want to block requests to GenServer if gun send down message, return nil, so we can make some retries, while connection is not up + # We don't want to block requests to GenServer. + # If gun sends a down message, return nil, so we can make some + # retries, while the connection is not up. Enum.each(conn.waiting_pids, fn waiting_pid -> GenServer.reply(waiting_pid, nil) end) state = put_in(state.conns[key].state, :down)