Forgot to flush

This commit is contained in:
Torjus Håkestad 2021-04-12 08:14:30 +02:00
parent b9eef3b3a8
commit 274590c837

View File

@ -174,9 +174,10 @@ func (s *Server) HandlerAttemptStream(w http.ResponseWriter, r *http.Request) {
case <-r.Context().Done():
return
case <-ticker.C:
if _, err := io.WriteString(w, ": %s\n\n"); err != nil {
if _, err := io.WriteString(w, ": keep-alive\n\n"); err != nil {
s.ServerLogger.Warnw("Error writing event", "error", err)
}
flusher.Flush()
}
}
}