mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-14 12:12:12 +08:00
Merge 7525086d6183fc19535e646922e54ff6e2878b04 into c3d1092b3b48addf6f9cd00fe274ec3bd14650eb
This commit is contained in:
commit
c5599057b7
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user