main
DustyP 9 months ago
parent 0a888dd446
commit 3b19054ead

@ -442,6 +442,7 @@ func (s *Server) handleEvents() http.HandlerFunc {
}() }()
// Keep connection open and send events as they arrive // Keep connection open and send events as they arrive
go func() {
for { for {
select { select {
case msg, ok := <-clientChan: case msg, ok := <-clientChan:
@ -456,6 +457,7 @@ func (s *Server) handleEvents() http.HandlerFunc {
return return
} }
} }
}()
} }
} }
@ -503,6 +505,7 @@ func (s *Server) handleAdminEvents() http.HandlerFunc {
}() }()
// Keep connection open and send events as they arrive // Keep connection open and send events as they arrive
go func() {
for { for {
select { select {
case msg, ok := <-clientChan: case msg, ok := <-clientChan:
@ -517,6 +520,7 @@ func (s *Server) handleAdminEvents() http.HandlerFunc {
return return
} }
} }
}()
} }
} }

Loading…
Cancel
Save