mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 00:09:35 +00:00
ConnectionPool middleware: fix a crash due to unimplemented behaviour
Structs don't implement Access behaviour, so this crashed. Tests didn't catch it and I didn't test that part of the codepath. Very sorry
This commit is contained in:
parent
8c8fb84a38
commit
5298de3be6
|
@ -32,7 +32,7 @@ defmodule Pleroma.Tesla.Middleware.ConnectionPool 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