Rebuild: the coordinator stops on SIGTERM

It waited for every chunk in flight, and a connection the server held
back (after killed coordinators left sessions open) waits up to the
10-minute reply timeout: it never seemed to stop. It now waits at most
15 s, then closes all connections, busy ones too; the greeting and login
time out after 30 s. And run() ends with terminate(), as edge:node does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Opus 5.5 committed 2026-10-09 03:20:11 +02:00
1 parent cae6e4f60d
commit 883d85e91d
3 files changed
+16 -3

No files matched your search

+2 -1
View File
@@ -67,7 +67,8 @@ export class XoverClient {
? tls.connect({ host: options.host, port: options.port, servername: options.servername || options.host })
: net.connect({ host: options.host, port: options.port })
const client = new XoverClient(sock, options.timeoutMs ?? 120_000)
sock.setTimeout(client.timeoutMs)
// The greeting and login are short: a server holding a connection back (too many open) fails it in 30 s, not timeoutMs.
sock.setTimeout(Math.min(client.timeoutMs, 30_000))
try {
await client.expect(await client.line(), ['200', '201'])
if (options.user) {