ConnectionPool: fix the previous hotfix

I rushed the hotfix and forgot how `pop_in` actually works,
I want to die. We need some integration tests for the HTTP client
stable
rinpatch 4 years ago
parent b42869424f
commit 9d6aca5bee

@ -32,7 +32,8 @@ defmodule Pleroma.Tesla.Middleware.ConnectionPool do
{:ok, env} ->
unless opts[:adapter][:body_as] == :chunks do
ConnectionPool.release_conn(conn_pid)
{:ok, pop_in(env.opts[:adapter][:conn])}
{_, res} = pop_in(env.opts[:adapter][:conn])
{:ok, res}
else
{:ok, env}
end

Loading…
Cancel
Save