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 82d2cfa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule SupabaseAuth.MixProject do
use Mix.Project

@version "0.3.1"
@version "0.3.2"
@source_url "https://github.com/zoedsoupe/gotrue-ex"

def project do
Expand Down

0 comments on commit 82d2cfa

Please sign in to comment.