mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #16286 from liggitt/wsstream_cpu
Avoid CPU hotloop on client-closed websocket
This commit is contained in:
commit
fcd99461ff
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user