projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http timeout config (#307)
[akkoma]
/
lib
/
pleroma
/
tesla
/
middleware
/
connection_pool.ex
diff --git
a/lib/pleroma/tesla/middleware/connection_pool.ex
b/lib/pleroma/tesla/middleware/connection_pool.ex
index 5909e98d69faba3e88f14a7e25383277b3eb7605..906706d39a45b1817782e08ab38a7b21ab76e138 100644
(file)
--- a/
lib/pleroma/tesla/middleware/connection_pool.ex
+++ b/
lib/pleroma/tesla/middleware/connection_pool.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 20
20
Pleroma Authors <https://pleroma.social/>
+# Copyright © 20
17-2021
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Tesla.Middleware.ConnectionPool do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Tesla.Middleware.ConnectionPool do
@@
-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, 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
else
{:ok, env}
end
@@
-41,6
+42,9
@@
defmodule Pleroma.Tesla.Middleware.ConnectionPool do
ConnectionPool.release_conn(conn_pid)
err
end
ConnectionPool.release_conn(conn_pid)
err
end
+
+ err ->
+ err
end
end
end
end
end
end