Merge 7525086d6183fc19535e646922e54ff6e2878b04 into ed150e72544949a96e7eb0b7d1151cf1907068fb

This commit is contained in:
Tiger Xu / Zhonghu Xu 2025-09-26 09:32:13 +08:00 committed by GitHub
commit 14b48d4d6c
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"
func (c *Context) Stream(step func(w io.Writer) bool) bool {
w := c.Writer
clientGone := w.CloseNotify()
clientGone := c.Request.Context().Done()
for {
select {
case <-clientGone: