Merge branch 'hotfix-the-hotfix' into 'develop'
ConnectionPool: fix the previous hotfix See merge request pleroma/pleroma!2959
This commit is contained in:
commit
047a60c46e
|
@ -32,7 +32,8 @@ def call(%Tesla.Env{url: url, opts: opts} = env, next, _) do
|
||||||
{:ok, env} ->
|
{:ok, env} ->
|
||||||
unless opts[:adapter][:body_as] == :chunks do
|
unless opts[:adapter][:body_as] == :chunks do
|
||||||
ConnectionPool.release_conn(conn_pid)
|
ConnectionPool.release_conn(conn_pid)
|
||||||
{:ok, pop_in(env.opts[:adapter][:conn])}
|
{_, res} = pop_in(env.opts[:adapter][:conn])
|
||||||
|
{:ok, res}
|
||||||
else
|
else
|
||||||
{:ok, env}
|
{:ok, env}
|
||||||
end
|
end
|
||||||
|
@ -41,6 +42,9 @@ def call(%Tesla.Env{url: url, opts: opts} = env, next, _) do
|
||||||
ConnectionPool.release_conn(conn_pid)
|
ConnectionPool.release_conn(conn_pid)
|
||||||
err
|
err
|
||||||
end
|
end
|
||||||
|
|
||||||
|
err ->
|
||||||
|
err
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue