Skip to content

Commit

Permalink
fix: make startup atomic to avoid double-initialization on chrome
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Moessbauer <[email protected]>
  • Loading branch information
fmoessbauer committed Jul 2, 2024
1 parent 664490f commit f021a77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -267,7 +269,6 @@ function on_startup() {
logout();
}
});
initialized = true;
}

// use this API to prevent the extension from being disabled
Expand Down

0 comments on commit f021a77

Please sign in to comment.