diff --git a/services/kanao-gateway/src/Utilities/WebSockets/ProcessShardingStrategy.ts b/services/kanao-gateway/src/Utilities/WebSockets/ProcessShardingStrategy.ts index a7db9061..352c1628 100644 --- a/services/kanao-gateway/src/Utilities/WebSockets/ProcessShardingStrategy.ts +++ b/services/kanao-gateway/src/Utilities/WebSockets/ProcessShardingStrategy.ts @@ -222,6 +222,7 @@ export class ProcessShardingStrategy implements IShardingStrategy { }).catch(error => setTimeout(() => { this.logger.error(error, "Error when starting worker !"); const worker = this.#workerByShardId.get(workerData.shardIds[0])!; + worker.on("error", error => this.logger.error({ error, shardIds: workerData.shardIds }, "process emitted error !")); this.#workers.splice(this.#workers.indexOf(worker), 1); this.restartWorker(workerData); }, 5_000));