Avoid CPU hotloop on client-closed websocket

This commit is contained in:
Jordan Liggitt 2015-10-26 14:04:16 -04:00
parent dbf9a53de9
commit 85379b12ca

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
}
}
}