mirror of
https://github.com/gin-gonic/gin.git
synced 2026-07-06 10:21:17 +08:00
Compare commits
2 Commits
905f2c0144
...
6249d46ccc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6249d46ccc | ||
|
|
b0e3cdc077 |
@ -1260,7 +1260,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