p2p/simulations: eventstream backend returns double-backslash on init (FF support)

This commit is contained in:
Fabio Barone 2017-05-22 11:50:18 -05:00
parent 02f6b66e8b
commit 7c05c8402b

View file

@ -466,6 +466,7 @@ func (s *Server) StreamNetworkEvents(w http.ResponseWriter, req *http.Request) {
w.Header().Set("Content-Type", "text/event-stream; charset=utf-8") w.Header().Set("Content-Type", "text/event-stream; charset=utf-8")
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)
fmt.Fprintf(w, "\n\n")
if fw, ok := w.(http.Flusher); ok { if fw, ok := w.(http.Flusher); ok {
fw.Flush() fw.Flush()
} }