Commit fcd99461 authored by Daniel Smith's avatar Daniel Smith

Merge pull request #16286 from liggitt/wsstream_cpu

Avoid CPU hotloop on client-closed websocket
parents 37ee9584 85379b12
...@@ -97,9 +97,7 @@ func ignoreReceives(ws *websocket.Conn, timeout time.Duration) { ...@@ -97,9 +97,7 @@ func ignoreReceives(ws *websocket.Conn, timeout time.Duration) {
for { for {
resetTimeout(ws, timeout) resetTimeout(ws, timeout)
if err := websocket.Message.Receive(ws, &data); err != nil { if err := websocket.Message.Receive(ws, &data); err != nil {
if err == io.EOF { return
return
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment