add keep-alive header to streamer

This commit is contained in:
Umputun
2019-06-18 18:14:58 -05:00
parent f1b03b4bc6
commit 7819c9ec4b
+2
View File
@@ -42,6 +42,8 @@ func (s *Streamer) Activate(ctx context.Context, eventFn func() steamEventFn, w
if ww, ok := w.(http.ResponseWriter); ok {
ww.Header().Set("Content-Type", "text/event-stream")
ww.Header().Set("Connection", "keep-alive")
ww.Header().Set("Cache-Control", "no-cache")
}
for {