Compare commits

..

No commits in common. "0c6e90e64485c7c02ec6c75de4c7511179bf8ef7" and "a0b561237aa2722c4a27217eae4a4a8248962353" have entirely different histories.

View File

@ -90,10 +90,6 @@ func (stream *event) HandlerFunc() mux.HandlerFunc {
c.Context().Writer.Header().Set("Connection", "keep-alive")
c.Context().Writer.Header().Set("Transfer-Encoding", "chunked")
time.AfterFunc(time.Second, func() {
e <- msgChan{Name: "message", Message: "success"}
})
c.Context().Stream(func(w io.Writer) bool {
if msg, ok := <-e; ok {
c.Context().SSEvent(msg.Name, msg.Message)