Merge pull request #94 from holisticode/network-testing-framework

p2p/simulations: eventstream backend double-backslash on init
This commit is contained in:
Viktor Trón 2017-05-27 21:04:04 -04:00 committed by GitHub
commit 5e3c9d6c93

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.WriteHeader(http.StatusOK)
fmt.Fprintf(w, "\n\n")
if fw, ok := w.(http.Flusher); ok {
fw.Flush()
}