From 0d03353828857a8d0eb17b318fd817ffb873fc40 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 26 Dec 2023 19:42:54 +0100 Subject: [PATCH] refactor: cleanup conditions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/abstract-pool.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index b72d8cbc..7b18d355 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1420,10 +1420,7 @@ export abstract class AbstractPool< } private redistributeQueuedTasks (workerNodeKey: number): void { - if (workerNodeKey === -1) { - return - } - if (this.cannotStealTask()) { + if (workerNodeKey === -1 || this.cannotStealTask()) { return } while (this.tasksQueueSize(workerNodeKey) > 0) { -- 2.34.1