some debug
This commit is contained in:
parent
aee44f3f4b
commit
9241df642c
@ -69,6 +69,10 @@ defmodule Pleroma.Gun.Connections do
|
|||||||
def handle_call({:conn, %{opts: opts, uri: uri}}, from, state) do
|
def handle_call({:conn, %{opts: opts, uri: uri}}, from, state) do
|
||||||
key = compose_key(uri)
|
key = compose_key(uri)
|
||||||
|
|
||||||
|
IO.inspect(state)
|
||||||
|
|
||||||
|
IO.inspect(key)
|
||||||
|
|
||||||
case state.conns[key] do
|
case state.conns[key] do
|
||||||
%{conn: conn, state: conn_state} when conn_state == :up ->
|
%{conn: conn, state: conn_state} when conn_state == :up ->
|
||||||
{:reply, conn, state}
|
{:reply, conn, state}
|
||||||
@ -87,6 +91,7 @@ defmodule Pleroma.Gun.Connections do
|
|||||||
protocol: String.to_atom(uri.scheme)
|
protocol: String.to_atom(uri.scheme)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
IO.inspect(state)
|
||||||
{:noreply, state}
|
{:noreply, state}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -62,7 +62,7 @@ defmodule Pleroma.HTTP do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp get_conn_for_gun(url, options) do
|
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 ->
|
nil ->
|
||||||
options
|
options
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user