Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/db_connection/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ defmodule DBConnection.Connection do
alias DBConnection.Util

@timeout 15_000
@sensitive_opts [:parameters, :hostname, :port, :username, :password, :database]

@doc false
def start_link(mod, opts, pool, tag) do
Expand Down Expand Up @@ -234,6 +235,7 @@ defmodule DBConnection.Connection do
case apply(mod, :checkout, [state]) do
{:ok, state} ->
opts = [timeout: timeout] ++ opts
opts = Keyword.drop(opts, @sensitive_opts)
{pid, ref} = DBConnection.Task.run_child(mod, state, after_connect, opts)
timer = start_timer(pid, timeout)
s = %{s | client: {ref, :after_connect}, timer: timer, state: state}
Expand Down
Loading