From: rinpatch Date: Sat, 5 Sep 2020 18:27:06 +0000 (+0300) Subject: ConnectionPool: fix the previous hotfix X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=9d6aca5bee6f90f3c0af5a5353f052108c9def62;p=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 --- diff --git a/lib/pleroma/tesla/middleware/connection_pool.ex b/lib/pleroma/tesla/middleware/connection_pool.ex index 049db6eb3..2c5a2b53b 100644 --- a/lib/pleroma/tesla/middleware/connection_pool.ex +++ b/lib/pleroma/tesla/middleware/connection_pool.ex @@ -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