Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
## [Unreleased]
+### Fixed
+
+- Fix default worker weight computation.
+- Fix possible null exception at pool destroying.
+
## [3.1.7] - 2023-12-20
### Fixed
private async sendKillMessageToWorker (workerNodeKey: number): Promise<void> {
await new Promise<void>((resolve, reject) => {
if (this.workerNodes?.[workerNodeKey] == null) {
- reject(new Error(`Invalid worker node key '${workerNodeKey}'`))
+ resolve()
return
}
const killMessageListener = (message: MessageValue<Response>): void => {
await expect(
pool.sendKillMessageToWorker(workerNodeKey)
).resolves.toBeUndefined()
- await expect(
- pool.sendKillMessageToWorker(numberOfWorkers)
- ).rejects.toStrictEqual(
- new Error(`Invalid worker node key '${numberOfWorkers}'`)
- )
await pool.destroy()
})