Remove logic to prevent running init 2 times
This commit is contained in:
parent
a0639f6094
commit
b5ecbbca52
@ -7,16 +7,10 @@ import { SessionApp } from '$lib/classes/sessions';
|
|||||||
import { SessionDBBroker } from '$lib/db-utils/Sessions';
|
import { SessionDBBroker } from '$lib/db-utils/Sessions';
|
||||||
import { AppData } from '$lib/classes/app-sessions';
|
import { AppData } from '$lib/classes/app-sessions';
|
||||||
import { logger } from '$lib/utils/logger';
|
import { logger } from '$lib/utils/logger';
|
||||||
|
import { JoseApp } from '$lib/utils/jtw-utils';
|
||||||
let initOnce = false
|
|
||||||
|
|
||||||
export const init: ServerInit = async () => {
|
export const init: ServerInit = async () => {
|
||||||
|
|
||||||
if (initOnce) {
|
|
||||||
logger.debug("Already Started, avoiding reinitializing", "App Init")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.debug("Starting app", "App Init")
|
logger.debug("Starting app", "App Init")
|
||||||
|
|
||||||
SSLSnifferApp.init()
|
SSLSnifferApp.init()
|
||||||
@ -26,8 +20,8 @@ export const init: ServerInit = async () => {
|
|||||||
SessionApp.init(
|
SessionApp.init(
|
||||||
new SessionDBBroker()
|
new SessionDBBroker()
|
||||||
)
|
)
|
||||||
|
JoseApp.init()
|
||||||
|
|
||||||
initOnce = true
|
|
||||||
logger.debug("Init run successfully", "App Init")
|
logger.debug("Init run successfully", "App Init")
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user