Move launch further down, temporarily

Summary: Attempt to fix an ongoing issue whereas there's a race condition generating certificates

Reviewed By: passy

Differential Revision: D49237915

fbshipit-source-id: 2383b20cb6ba786166d5e70206b5fff846ed1211
This commit is contained in:
Lorenzo Blasa
2023-09-13 11:52:46 -07:00
committed by Facebook GitHub Bot
parent 58c891b1d2
commit cf599f9c3c
2 changed files with 3 additions and 9 deletions

View File

@@ -329,12 +329,6 @@ export const generateAuthToken = async () => {
}; };
export const getAuthToken = async (): Promise<string> => { export const getAuthToken = async (): Promise<string> => {
// Ensure we check for the validity of certificates before
// returning an authentication token.
// If the server certificates have expired, they will need
// to be renewed and will invalidate any existing token.
await ensureServerCertExists();
if (!(await hasAuthToken())) { if (!(await hasAuthToken())) {
return generateAuthToken(); return generateAuthToken();
} }

View File

@@ -235,9 +235,6 @@ async function start() {
`[flipper-server][bootstrap] FlipperServer created (${serverCreatedMS} ms)`, `[flipper-server][bootstrap] FlipperServer created (${serverCreatedMS} ms)`,
); );
// At this point, the HTTP server is ready and configuration is set.
await launch();
const t6 = performance.now(); const t6 = performance.now();
const launchedMS = t6 - t5; const launchedMS = t6 - t5;
@@ -266,6 +263,9 @@ async function start() {
} }
await flipperServer.connect(); await flipperServer.connect();
// At this point, the HTTP server is ready and configuration is set.
await launch();
const t8 = performance.now(); const t8 = performance.now();
const appServerStartedMS = t8 - t7; const appServerStartedMS = t8 - t7;
console.info( console.info(