Skip to content

Commit

Permalink
Rollback httpClient changes and address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklas-dohrn committed Sep 12, 2024
1 parent cdb4378 commit f010a31
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pkg/egress/syslog/https.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func (w *HTTPSWriter) sendHttpRequest(msg []byte, msgCount float64) error {
req.SetBody(msg)

resp := fasthttp.AcquireResponse()
defer fasthttp.ReleaseRequest(req)
defer fasthttp.ReleaseResponse(resp)

err := w.client.Do(req, resp)
Expand Down Expand Up @@ -103,8 +104,10 @@ func (*HTTPSWriter) Close() error {

func httpClient(_ NetworkTimeoutConfig, tlsConf *tls.Config) *fasthttp.Client {
return &fasthttp.Client{
MaxConnsPerHost: 100,
MaxIdleConnDuration: 10 * time.Second,
MaxConnsPerHost: 5,
MaxIdleConnDuration: 90 * time.Second,
TLSConfig: tlsConf,
ReadTimeout: 20 * time.Second,
WriteTimeout: 20 * time.Second,
}
}

0 comments on commit f010a31

Please sign in to comment.