Real heartbeat timeouts server -> client

This commit is contained in:
Ian Gulliver
2020-11-25 23:34:09 +00:00
parent 7d1035f751
commit a95fdbbf10
3 changed files with 26 additions and 2 deletions

View File

@@ -623,8 +623,7 @@ func writeInitial(client *client, w http.ResponseWriter, flusher http.Flusher) {
}
func writeHeartbeat(w http.ResponseWriter, flusher http.Flusher) {
fmt.Fprintf(w, ":\n\n")
flusher.Flush()
writeEvent(&event{}, w, flusher)
}
func writeEvent(e *event, w http.ResponseWriter, flusher http.Flusher) {