From 3bff0d779c6e1d8cc28566f4e427419b483cd6a3 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 31 Oct 2026 01:51:47 +0100 Subject: [PATCH] persona matrix mouth: log the many-peer server's errors and keep serving Co-Authored-By: Claude Opus 5.5 --- tools/persona-matrix-mouth.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/persona-matrix-mouth.mjs b/tools/persona-matrix-mouth.mjs index c19854a..c991288 100644 --- a/tools/persona-matrix-mouth.mjs +++ b/tools/persona-matrix-mouth.mjs @@ -363,6 +363,8 @@ export async function startChatEndpoint({ mouths, runtime, port, connectionKey, const busy = new WeakMap(); const frame = value => { busy.set(value.peer, (busy.get(value.peer) ?? Promise.resolve()).then(() => handle(value))); }; server.on("frame", frame); + // A socket error is logged; the endpoint keeps serving. + server.on("error", error => log(`chat endpoint socket error: ${error?.message ?? error}`)); return { address: socket.address(), close() { server.off("frame", frame); server.close(); } }; }