Skip to content

Commit

Permalink
remove flush for each write to http response in the agent monitor end…
Browse files Browse the repository at this point in the history
…point
  • Loading branch information
dhiaayachi committed Jun 9, 2021
1 parent cf5cdf0 commit 6c39a98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/agent_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}
Expand Down

0 comments on commit 6c39a98

Please sign in to comment.