fix for gun connections pool
This commit is contained in:
parent
dd4d10b275
commit
5739c498c0
2 changed files with 6 additions and 1 deletions
|
|
@ -49,8 +49,10 @@ defmodule Pleroma.Gun.Conn do
|
|||
|
||||
key = "#{uri.scheme}:#{uri.host}:#{uri.port}"
|
||||
|
||||
max_connections = pool_opts[:max_connections] || 250
|
||||
|
||||
conn_pid =
|
||||
if Connections.count(name) < opts[:max_connection] do
|
||||
if Connections.count(name) < max_connections do
|
||||
do_open(uri, opts)
|
||||
else
|
||||
close_least_used_and_do_open(name, uri, opts)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue