From 6f244d56a3e9ba95e331de520e63f84634b1cc89 Mon Sep 17 00:00:00 2001 From: Zack Siri Date: Mon, 4 Nov 2024 13:51:33 +0700 Subject: [PATCH 1/2] Add api function call to connect --- lib/lexdee/observer.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/lexdee/observer.ex b/lib/lexdee/observer.ex index 3420b61..aaf1308 100644 --- a/lib/lexdee/observer.ex +++ b/lib/lexdee/observer.ex @@ -26,11 +26,15 @@ defmodule Lexdee.Observer do :last_pinged_at ] + def connect(pid) do + GenServer.call(pid, :connect) + end + def start_link(options) do name = Keyword.get(options, :name) with {:ok, pid} <- GenServer.start_link(__MODULE__, options, name: name), - {:ok, :connected} <- GenServer.call(pid, :connect) do + {:ok, :connected} <- connect(pid) do {:ok, pid} end end From 002fc5c540986cb701788f921935998967ce4851 Mon Sep 17 00:00:00 2001 From: Zack Siri Date: Mon, 4 Nov 2024 13:52:28 +0700 Subject: [PATCH 2/2] Update version --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index eb8f9f2..588dbb4 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Lexdee.MixProject do def project do [ app: :lexdee, - version: "2.4.4", + version: "2.4.5", elixir: "~> 1.9", elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod,