remove flush for each write to http response in the agent monitor endpoint

pull/10368/head
Dhia Ayachi 4 years ago
parent cf5cdf07a0
commit 6c39a98255

@ -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()
}
}
}

Loading…
Cancel
Save