diff --git a/lib/pleroma/gun/connections.ex b/lib/pleroma/gun/connections.ex index d5a9d8607..82579604a 100644 --- a/lib/pleroma/gun/connections.ex +++ b/lib/pleroma/gun/connections.ex @@ -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 diff --git a/lib/pleroma/http/http.ex b/lib/pleroma/http/http.ex index 1846749c0..3ad891d11 100644 --- a/lib/pleroma/http/http.ex +++ b/lib/pleroma/http/http.ex @@ -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