From 6c39a9825580e3e4375acafed557d73146b1443f Mon Sep 17 00:00:00 2001 From: Dhia Ayachi Date: Tue, 8 Jun 2021 22:12:28 -0400 Subject: [PATCH] remove flush for each write to http response in the agent monitor endpoint --- agent/agent_endpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/agent_endpoint.go b/agent/agent_endpoint.go index babb906f09..5623a13a95 100644 --- a/agent/agent_endpoint.go +++ b/agent/agent_endpoint.go @@ -1211,10 +1211,10 @@ func (s *HTTPHandlers) AgentMonitor(resp http.ResponseWriter, req *http.Request) if droppedCount > 0 { s.agent.logger.Warn("Dropped logs during monitor request", "dropped_count", droppedCount) } + flusher.Flush() return nil, nil case log := <-logsCh: fmt.Fprint(resp, string(log)) - flusher.Flush() } } }