Files
hermes-webui/api
Sanjays2402 ab4de3bb64 Fix #3103: stop emitting Connection: close on long-lived SSE streams
The gateway SSE handler (`_handle_gateway_sse_stream`) and session-events
SSE handler (`_handle_session_events_stream`) both set
`Connection: close` on the response. On long-lived SSE streams, browsers
(Chrome, Firefox, Safari) interpret that header as 'this is a one-shot
response, the EventSource lifecycle is over the moment the body ends'
and trigger an immediate reconnect when the server-side worker rotates.

The result, with EventSource's auto-reconnect on top, is a tight loop of
connect -> sessions_changed snapshot -> reconnect every ~1s that pegs
the worker, thrashes the session list, and prevents the in-app session
list from ever settling.

Removing the header lets the python BaseHTTPServer close the socket
naturally after the stream ends, which is what EventSource expects.

Regression introduced in 598fd4ff.
2026-05-30 02:02:40 +00:00
..
2026-05-28 13:38:50 -04:00
2026-05-29 23:22:15 +00:00
2026-04-29 19:54:07 -07:00
2026-05-28 13:38:50 -04:00
2026-05-25 00:14:38 +00:00
2026-05-28 17:47:33 +00:00
2026-05-29 22:15:46 +00:00
2026-05-15 16:39:45 -07:00
2026-05-28 08:33:50 -04:00