Commit 85379b12 authored by Jordan Liggitt's avatar Jordan Liggitt

Avoid CPU hotloop on client-closed websocket

parent dbf9a53d
......@@ -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
}
}
}
......
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