From 274590c8374aea267936a126f9b68f9ab84425b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Mon, 12 Apr 2021 08:14:30 +0200 Subject: [PATCH] Forgot to flush --- web/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/server.go b/web/server.go index 79a29f6..39652cf 100644 --- a/web/server.go +++ b/web/server.go @@ -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() } } }