via

Simple pubsub server inspired by https://patchbay.pub/
git clone https://git.ce9e.org/via.git

commit
48b6f24e8ce3c4aca10381eb3f99183223cf0520
parent
13277d0748a571511aca07ead602a59f7d07ca22
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-05-05 16:54
sse: write first ping immediately

Diffstat

M via.go 1 +

1 files changed, 1 insertions, 0 deletions


diff --git a/via.go b/via.go

@@ -163,6 +163,7 @@ func getSse(w http.ResponseWriter, r *http.Request) {
  163   163 	w.Header().Set("Content-Type", "text/event-stream")
  164   164 	w.Header().Set("X-Accel-Buffering", "no")
  165   165 	w.WriteHeader(http.StatusOK)
   -1   166 	fmt.Fprintf(w, ": ping\n\n")
  166   167 	flusher.Flush()
  167   168 
  168   169 	for {