diff --git a/lib/supavisor/client_handler.ex b/lib/supavisor/client_handler.ex index cc4d3916..ab49ee38 100644 --- a/lib/supavisor/client_handler.ex +++ b/lib/supavisor/client_handler.ex @@ -707,7 +707,7 @@ defmodule Supavisor.ClientHandler do :ok end - def terminate(reason, _state, %{db_pid: {_, pid}}) do + def terminate(reason, _state, %{db_pid: {_, pid, _}}) do db_info = with {:ok, {state, mode} = resp} <- DbHandler.get_state_and_mode(pid) do if state == :busy or mode == :session, do: DbHandler.stop(pid) diff --git a/lib/supavisor/db_handler.ex b/lib/supavisor/db_handler.ex index 6e0d5c51..e747d4d5 100644 --- a/lib/supavisor/db_handler.ex +++ b/lib/supavisor/db_handler.ex @@ -42,7 +42,10 @@ defmodule Supavisor.DbHandler do end @spec stop(pid()) :: :ok - def stop(pid), do: :gen_statem.stop(pid, :client_termination, 5_000) + def stop(pid) do + Logger.debug("DbHandler: Stop pid #{inspect(pid)}") + :gen_statem.stop(pid, :client_termination, 5_000) + end @impl true def init(args) do diff --git a/mix.exs b/mix.exs index bf04f113..4f3bc45f 100644 --- a/mix.exs +++ b/mix.exs @@ -68,7 +68,7 @@ defmodule Supavisor.MixProject do # pooller # {:poolboy, "~> 1.5.2"}, - {:poolboy, git: "https://github.com/abc3/poolboy.git", tag: "v0.0.3"}, + {:poolboy, git: "https://github.com/abc3/poolboy.git", tag: "v0.0.2"}, {:syn, "~> 3.3"}, {:pgo, "~> 0.13"}, {:rustler, "~> 0.34.0"},