From a2e0e562686bd9c8d41087e15d10cb62a97a716f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 7 Nov 2023 21:11:57 +0100 Subject: [PATCH] fix(simulator): remove unneeded main thread check at simulator start MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/Bootstrap.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index f3f6d8b0..4e848c1f 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -4,7 +4,6 @@ import { EventEmitter } from 'node:events'; import { dirname, extname, join } from 'node:path'; import { exit } from 'node:process'; import { fileURLToPath } from 'node:url'; -import { isMainThread } from 'node:worker_threads'; import chalk from 'chalk'; import { availableParallelism } from 'poolifier'; @@ -111,9 +110,6 @@ export class Bootstrap extends EventEmitter { } public async start(): Promise { - if (!isMainThread) { - throw new BaseError('Cannot start charging stations simulator from worker thread'); - } if (this.started === false) { if (this.starting === false) { this.starting = true; -- 2.34.1