For events, write header and flush earlier
All checks were successful
the build was successful

This commit is contained in:
Peter Stuifzand 2019-02-20 10:41:52 +01:00
parent 83956b4d9f
commit 0d24e58c88
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -123,6 +123,10 @@ func (h *microsubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Connection", "keep-alive")
w.Header().Set("Access-Control-Allow-Origin", "*")
w.WriteHeader(200)
flusher.Flush()
// Each connection registers its own message channel with the Broker's connections registry
messageChan := make(MessageChan)