Merge branch 'hotfix/tesla-env-no-access' into 'develop'
ConnectionPool middleware: fix a crash due to unimplemented behaviour See merge request pleroma/pleroma!2958
This commit is contained in:
commit
b42869424f
|
@ -32,7 +32,7 @@ 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])}
|
{:ok, pop_in(env.opts[:adapter][:conn])}
|
||||||
else
|
else
|
||||||
{:ok, env}
|
{:ok, env}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue