Merge 7525086d6183fc19535e646922e54ff6e2878b04 into c3d1092b3b48addf6f9cd00fe274ec3bd14650eb

This commit is contained in:
Tiger Xu / Zhonghu Xu 2025-10-11 21:19:01 +08:00 committed by GitHub
commit c5599057b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1249,7 +1249,7 @@ func (c *Context) SSEvent(name string, message any) {
// indicates "Is client disconnected in middle of stream" // indicates "Is client disconnected in middle of stream"
func (c *Context) Stream(step func(w io.Writer) bool) bool { func (c *Context) Stream(step func(w io.Writer) bool) bool {
w := c.Writer w := c.Writer
clientGone := w.CloseNotify() clientGone := c.Request.Context().Done()
for { for {
select { select {
case <-clientGone: case <-clientGone: