mirror of https://github.com/k3s-io/k3s
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-tpull/6/head
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