persona matrix mouth: log the many-peer server's errors and keep serving
Some checks failed
Publish Container / Build and publish Bifrost image (push) Has been cancelled
Some checks failed
Publish Container / Build and publish Bifrost image (push) Has been cancelled
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b892c64f00
commit
3bff0d779c
1 changed files with 2 additions and 0 deletions
|
|
@ -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(); } };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue