Write header before sending data
This commit is contained in:
parent
274590c837
commit
a264ce76ed
@ -152,6 +152,7 @@ func (s *Server) HandlerAttemptStream(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
id, ch := s.addAttemptListener()
|
||||
defer s.closeAttemptListener(id)
|
||||
w.WriteHeader(http.StatusOK)
|
||||
|
||||
flusher := w.(http.Flusher)
|
||||
ticker := time.NewTicker(30 * time.Second)
|
||||
|
Loading…
Reference in New Issue
Block a user