Files
cozystack/internal
Aleksei Sviridkin 40d340a3fc fix(sse): wait for the pump before returning
When a client disconnected, the handler stopped its pump and returned at
once, while the pump could still be writing an event or a heartbeat to
the response. net/http does not allow a write to a response after
ServeHTTP has returned. The handler now waits for the pump to exit; a
pump blocked in a write returns once the connection is gone.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-13 12:35:06 +03:00
..