refactor: remove unreachable code
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 23 Aug 2023 11:19:46 +0000 (13:19 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 23 Aug 2023 11:19:46 +0000 (13:19 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/pools/abstract-pool.ts

index 7310e9efa2abd32e58bbb6744049e7f1573dbc34..e61991f222ae98024f47038d8e211b420b8ed507 100644 (file)
@@ -921,13 +921,6 @@ export abstract class AbstractPool<
       workerTaskStatistics.executing > 0
     ) {
       --workerTaskStatistics.executing
-    } else if (
-      workerTaskStatistics.executing != null &&
-      workerTaskStatistics.executing < 0
-    ) {
-      throw new Error(
-        'Worker usage statistic for tasks executing cannot be negative'
-      )
     }
     if (message.taskError == null) {
       ++workerTaskStatistics.executed