830 B
830 B
F-139 — Architect (bug fix)
Bug
Admin /admin/logs/stream SSE connection drops with ERR_NETWORK_IO_SUSPENDED.
Root causes
- Proxy (
apps/admin/src/app/api/[...path]/route.ts): did not setX-Accel-Buffering: no, which causes intermediate proxies (nginx) to buffer the SSE stream and kill it. - Client (
ServerLogViewer.tsx):connect()goes toreconnectingstatus on drop but never actually reconnects — no retry loop. LogBroadcaster.stream(): dead code — never used by the SSE route (usesregisterClient()instead).
Fixes
- Proxy: add
X-Accel-Buffering: noheader; remove explicitConnection: keep-alive(default for HTTP/1.1). - Client: add exponential backoff reconnection loop (1s → 2s → 4s … max 30s).
- Backend SSE endpoint already correct with proper headers.