formatting and pool fix
This commit is contained in:
parent
b8ee025792
commit
70c4f00349
@ -112,8 +112,8 @@ defmodule Pleroma.Gun.Connections do
|
||||
|
||||
@impl true
|
||||
def handle_info({:gun_down, conn_pid, _protocol, _reason, _killed, _unprocessed}, state) do
|
||||
conn_key = compose_key_gun_info(conn_pid)
|
||||
{key, conn} = find_conn(state.conns, conn_pid, conn_key)
|
||||
# we can't get info on this pid, because pid is dead
|
||||
{key, conn} = find_conn(state.conns, conn_pid)
|
||||
|
||||
Enum.each(conn.waiting_pids, fn waiting_pid -> GenServer.reply(waiting_pid, nil) end)
|
||||
|
||||
@ -128,6 +128,12 @@ defmodule Pleroma.Gun.Connections do
|
||||
"#{info.origin_scheme}:#{info.origin_host}:#{info.origin_port}"
|
||||
end
|
||||
|
||||
defp find_conn(conns, conn_pid) do
|
||||
Enum.find(conns, fn {_key, conn} ->
|
||||
conn.conn == conn_pid
|
||||
end)
|
||||
end
|
||||
|
||||
defp find_conn(conns, conn_pid, conn_key) do
|
||||
Enum.find(conns, fn {key, conn} ->
|
||||
key == conn_key and conn.conn == conn_pid
|
||||
|
@ -91,8 +91,9 @@ defmodule Pleroma.HTTP do
|
||||
"https" ->
|
||||
adapter_opts = Keyword.get(options, :adapter, [])
|
||||
|
||||
tls_opts = Keyword.get(adapter_opts, :tls_opts, [])
|
||||
|> Keyword.put(:server_name_indication, host)
|
||||
tls_opts =
|
||||
Keyword.get(adapter_opts, :tls_opts, [])
|
||||
|> Keyword.put(:server_name_indication, host)
|
||||
|
||||
adapter_opts = Keyword.put(adapter_opts, :tls_opts, tls_opts)
|
||||
|
||||
|
@ -555,7 +555,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
|
||||
note_two = insert(:note, data: %{"context" => "suya.."})
|
||||
activity_two = insert(:note_activity, note: note_two)
|
||||
|
||||
{:ok, activity_two} = CommonAPI.add_mute(user, activity_two)
|
||||
{:ok, _activity_two} = CommonAPI.add_mute(user, activity_two)
|
||||
|
||||
assert [_activity_two, _activity_one] =
|
||||
ActivityPub.fetch_activities([], %{"muting_user" => user, "with_muted" => true})
|
||||
|
Loading…
Reference in New Issue
Block a user