some debug

This commit is contained in:
Alex S 2019-08-14 14:08:10 +03:00
parent aee44f3f4b
commit 9241df642c
2 changed files with 6 additions and 1 deletions

View File

@ -69,6 +69,10 @@ defmodule Pleroma.Gun.Connections do
def handle_call({:conn, %{opts: opts, uri: uri}}, from, state) do
key = compose_key(uri)
IO.inspect(state)
IO.inspect(key)
case state.conns[key] do
%{conn: conn, state: conn_state} when conn_state == :up ->
{:reply, conn, state}
@ -87,6 +91,7 @@ defmodule Pleroma.Gun.Connections do
protocol: String.to_atom(uri.scheme)
})
IO.inspect(state)
{:noreply, state}
end
end

View File

@ -62,7 +62,7 @@ defmodule Pleroma.HTTP do
end
defp get_conn_for_gun(url, options) do
case Pleroma.Gun.Connections.try_to_get_gun_conn(url) do
case Pleroma.Gun.Connections.get_conn(url) do
nil ->
options