forked from AkkomaGang/akkoma
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
This commit is contained in:
parent
b42869424f
commit
9d6aca5bee
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue