diff --git a/src/servers/sidecar/music/index.ts b/src/servers/sidecar/music/index.ts index 90917117..1f5a73df 100644 --- a/src/servers/sidecar/music/index.ts +++ b/src/servers/sidecar/music/index.ts @@ -74,6 +74,10 @@ const port = getFreePort(); const server = Bun.serve({ port, hostname: '127.0.0.1', + // A blocking /reindex (esp. the one-time full rebuild) and long range/SSE reads far outlast Bun's + // default 10s request idle-timeout, which would drop them mid-flight. 255s is Bun's max; a build that + // still outruns it completes in the background anyway (the promise isn't cancelled by a closed socket). + idleTimeout: 255, async fetch(req) { const url = new URL(req.url); const json = (data: unknown, init?: ResponseInit) =>