Switch the reclaimer to GenServer.start so it is not linked

This commit is contained in:
Mark Felder 2024-06-20 14:17:28 -04:00
parent c765fcbe7e
commit 9ef021e2da
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ defmodule Pleroma.Gun.ConnectionPool.Reclaimer do
def start_monitor do
pid =
case GenServer.start_link(__MODULE__, [], name: {:via, Registry, {registry(), "reclaimer"}}) do
case GenServer.start(__MODULE__, [], name: {:via, Registry, {registry(), "reclaimer"}}) do
{:ok, pid} ->
pid

View File

@ -37,7 +37,7 @@ defmodule Pleroma.Gun.ConnectionPool.WorkerSupervisor do
def start_worker(opts, false) do
case DynamicSupervisor.start_child(__MODULE__, {Worker, opts}) do
{:error, :max_children} ->
spawn(fn -> free_pool() end)
free_pool()
start_worker(opts, true)
res ->