mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Merge pull request #26085 from smarterclayton/delay_flush
Automatic merge from submit-queue Delay flush if the watch queue has pending items Simple deferral of flush can reduce Syscalls when watch queues build up. Simpler version of #24768 Fixes #24729 @xiang90 @wojtek-t
This commit is contained in:
commit
ce788c45ef
@ -203,7 +203,9 @@ func (s *WatchServer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
// client disconnect.
|
||||
return
|
||||
}
|
||||
flusher.Flush()
|
||||
if len(ch) == 0 {
|
||||
flusher.Flush()
|
||||
}
|
||||
|
||||
buf.Reset()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user