()
| 86 | } |
| 87 | |
| 88 | const sendHeartbeat = () => { |
| 89 | // SSE comment line — keeps proxies (ALB default 60s idle) from closing |
| 90 | // the connection during quiet periods. |
| 91 | enqueue(`: ping ${Date.now()}\n\n`) |
| 92 | } |
| 93 | |
| 94 | try { |
| 95 | // Initial replay from buffer. |