Skip to content

Commit

Permalink
fix: let you reuse already started client
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedsoupe committed Apr 21, 2024
1 parent c18930e commit 308fd49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/supabase/go_true.ex
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ defmodule Supabase.GoTrue do
opts = [name: unquote(client), client_info: config]
Supabase.Client.start_link(opts)
end
|> then(fn
{:ok, pid} -> {:ok, pid}
{:error, {:already_started, pid}} -> {:ok, pid}
err -> err
end)
end

unquote(gotrue_functions)
Expand Down

0 comments on commit 308fd49

Please sign in to comment.