From 1c171579c3fc08059960a857880264a020dcc2b5 Mon Sep 17 00:00:00 2001 From: Savannah Manning Date: Fri, 17 May 2024 14:27:58 -0600 Subject: [PATCH 1/3] add fb to session store --- lib/wallaby/session_store.ex | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/wallaby/session_store.ex b/lib/wallaby/session_store.ex index f666b3fc..d95e153a 100644 --- a/lib/wallaby/session_store.ex +++ b/lib/wallaby/session_store.ex @@ -33,7 +33,7 @@ defmodule Wallaby.SessionStore do if(name == :session_store, do: [:named_table], else: []) ++ [:set, :public, read_concurrency: true] - Process.flag(:trap_exit, true) + # Process.flag(:trap_exit, true) tid = :ets.new(name, opts) Application.ensure_all_started(:ex_unit) @@ -93,6 +93,14 @@ defmodule Wallaby.SessionStore do {:noreply, state} end + def handle_info({:EXIT, _pid, :normal}, state) do + # Fallback - Handle the normal exit signal appropriately + # Just log it or ignore as per the requirement + Logger.info("Received normal exit signal from linked process") + + {:noreply, state} + end + defp delete_sessions({_, session}) do WebdriverClient.delete_session(session) end From f1cd204f3979f319a99e88244ebaa0a64392145f Mon Sep 17 00:00:00 2001 From: Savannah Manning Date: Fri, 17 May 2024 14:32:22 -0600 Subject: [PATCH 2/3] w/o fb --- lib/wallaby/session_store.ex | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/wallaby/session_store.ex b/lib/wallaby/session_store.ex index d95e153a..b88c2c8e 100644 --- a/lib/wallaby/session_store.ex +++ b/lib/wallaby/session_store.ex @@ -33,7 +33,7 @@ defmodule Wallaby.SessionStore do if(name == :session_store, do: [:named_table], else: []) ++ [:set, :public, read_concurrency: true] - # Process.flag(:trap_exit, true) + Process.flag(:trap_exit, false) tid = :ets.new(name, opts) Application.ensure_all_started(:ex_unit) @@ -93,14 +93,6 @@ defmodule Wallaby.SessionStore do {:noreply, state} end - def handle_info({:EXIT, _pid, :normal}, state) do - # Fallback - Handle the normal exit signal appropriately - # Just log it or ignore as per the requirement - Logger.info("Received normal exit signal from linked process") - - {:noreply, state} - end - defp delete_sessions({_, session}) do WebdriverClient.delete_session(session) end From 7d64534038965dd2909c50c3c251edcd3f5273d1 Mon Sep 17 00:00:00 2001 From: Savannah Manning Date: Fri, 17 May 2024 14:49:24 -0600 Subject: [PATCH 3/3] remove process flag --- lib/wallaby/session_store.ex | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/wallaby/session_store.ex b/lib/wallaby/session_store.ex index b88c2c8e..4fea1683 100644 --- a/lib/wallaby/session_store.ex +++ b/lib/wallaby/session_store.ex @@ -33,7 +33,6 @@ defmodule Wallaby.SessionStore do if(name == :session_store, do: [:named_table], else: []) ++ [:set, :public, read_concurrency: true] - Process.flag(:trap_exit, false) tid = :ets.new(name, opts) Application.ensure_all_started(:ex_unit)