Merge pull request #16286 from liggitt/wsstream_cpu

Avoid CPU hotloop on client-closed websocket
This commit is contained in:
Daniel Smith 2015-10-26 17:19:20 -07:00
commit fcd99461ff

View File

@ -97,9 +97,7 @@ func ignoreReceives(ws *websocket.Conn, timeout time.Duration) {
for {
resetTimeout(ws, timeout)
if err := websocket.Message.Receive(ws, &data); err != nil {
if err == io.EOF {
return
}
return
}
}
}