From e5e8c563d3c94c3277b7d33cf341044a375daee4 Mon Sep 17 00:00:00 2001 From: Felix Moessbauer Date: Mon, 1 Jul 2024 20:06:02 +0200 Subject: [PATCH] fix: make startup atomic to avoid double-initialization on chrome Signed-off-by: Felix Moessbauer --- background.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/background.js b/background.js index 427f452..9df0467 100644 --- a/background.js +++ b/background.js @@ -226,6 +226,8 @@ function on_startup() { ssoLog('linux-entra-sso already initialized'); return; } + initialized = true; + ssoLog('start linux-entra-sso'); port = chrome.runtime.connectNative("linux_entra_sso"); chrome.action.disable(); @@ -267,7 +269,6 @@ function on_startup() { logout(); } }); - initialized = true; } // use this API to prevent the extension from being disabled