Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
## [Unreleased]
+### Fixed
+
+- Fix possible null exception at task finishing handling.
+
## [3.1.18] - 2024-01-06
### Fixed
this.promiseResponseMap.delete(taskId!)
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
workerNode?.emit('taskFinished', taskId)
- if (this.opts.enableTasksQueue === true && !this.destroying) {
+ if (
+ this.opts.enableTasksQueue === true &&
+ !this.destroying &&
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
+ workerNode != null
+ ) {
const workerNodeTasksUsage = workerNode.usage.tasks
if (
this.tasksQueueSize(workerNodeKey) > 0 &&