diff --git a/project/src/servers/HttpServer.ts b/project/src/servers/HttpServer.ts index 80a61fad..13f98282 100644 --- a/project/src/servers/HttpServer.ts +++ b/project/src/servers/HttpServer.ts @@ -10,7 +10,6 @@ import { WebSocketServer } from "@spt/servers/WebSocketServer"; import { IHttpListener } from "@spt/servers/http/IHttpListener"; import { LocalisationService } from "@spt/services/LocalisationService"; import { inject, injectAll, injectable } from "tsyringe"; -import { DatabaseService } from "@spt/services/DatabaseService"; @injectable() export class HttpServer { @@ -19,7 +18,6 @@ export class HttpServer { constructor( @inject("PrimaryLogger") protected logger: ILogger, - @inject("DatabaseService") protected databaseService: DatabaseService, @inject("HttpServerHelper") protected httpServerHelper: HttpServerHelper, @inject("LocalisationService") protected localisationService: LocalisationService, @injectAll("HttpListener") protected httpListeners: IHttpListener[], @@ -36,12 +34,6 @@ export class HttpServer { public load(): void { this.started = false; - // If the database couldn't be validated, don't start the server - if (!this.databaseService.isDatabaseValid()) - { - return; - } - /* create server */ const httpServer: Server = http.createServer(); diff --git a/project/src/services/PostDbLoadService.ts b/project/src/services/PostDbLoadService.ts index ef041612..f9946e4e 100644 --- a/project/src/services/PostDbLoadService.ts +++ b/project/src/services/PostDbLoadService.ts @@ -61,9 +61,8 @@ export class PostDbLoadService { // Kill the startup if not. // TODO: We can probably remove this in a couple versions this.databaseService.validateDatabase(); - if (!this.databaseService.isDatabaseValid()) - { - return; + if (!this.databaseService.isDatabaseValid()) { + throw new Error("Server start failure"); } this.addCustomLooseLootPositions();