1
mirror of https://github.com/thepeacockproject/Peacock synced 2024-11-22 22:12:45 +01:00

Prevent _checkInit debug message when LiveSplit is disabled

This commit is contained in:
Lennard Fonteijn 2022-11-19 21:50:07 +01:00 committed by Reece Dunham
parent 449a8f7fe9
commit 770187586b
2 changed files with 8 additions and 5 deletions

View File

@ -553,10 +553,8 @@ function startServer(options: { hmr: boolean; pluginDevHost: boolean }): void {
initRp()
}
if (getFlag("liveSplit") === true) {
// initialize livesplit
liveSplitManager.init()
}
// initialize livesplit
liveSplitManager.init()
}
program.option(

View File

@ -230,6 +230,12 @@ export class LiveSplitManager {
*/
async init() {
if (!getFlag("liveSplit")) {
this._initializationAttempted = true
return
}
try {
logLiveSplitError(await this._liveSplitClient.connect(), "connect")
logLiveSplitError(
@ -247,7 +253,6 @@ export class LiveSplitManager {
} catch (e) {
log(LogLevel.DEBUG, "Failed to initialize LiveSplit: ")
log(LogLevel.DEBUG, e)
this._initializationAttempted = true
}
}