mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +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,11 +97,9 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// handshake ensures the provided user protocol matches one of the allowed protocols. It returns
|
||||
|
Loading…
Reference in New Issue
Block a user