diff --git a/server/sse.go b/server/sse.go index f69451c6d..8e749947d 100644 --- a/server/sse.go +++ b/server/sse.go @@ -308,6 +308,8 @@ func (s *SSEServer) handleSSE(w http.ResponseWriter, r *http.Request) { case <-r.Context().Done(): close(session.done) return + case <-session.done: + return } } }