Skip to content

Commit

Permalink
limit MaxConnsPerHost to avoid to many connections on start up
Browse files Browse the repository at this point in the history
  • Loading branch information
mark4z committed Apr 4, 2023
1 parent cc8cf5d commit fa311e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions requester/requester.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ func (b *Work) runWorkers() {
ServerName: b.Request.Host,
},
MaxIdleConnsPerHost: min(b.C, maxIdleConn),
MaxConnsPerHost: min(b.C, maxIdleConn),
DisableCompression: b.DisableCompression,
DisableKeepAlives: b.DisableKeepAlives,
Proxy: http.ProxyURL(b.ProxyAddr),
Expand Down

0 comments on commit fa311e6

Please sign in to comment.