disable keepalives so connections stop after data transfer complete
This commit is contained in:
parent
ca90b7071e
commit
4c7a0f54f7
1 changed files with 3 additions and 4 deletions
|
|
@ -63,10 +63,9 @@ func processIcon(icon IconRow, cfg Config) DownloadResult {
|
|||
|
||||
// httpTransport is shared across all goroutines for connection pooling and TLS session reuse.
|
||||
var httpTransport = &http.Transport{
|
||||
MaxIdleConns: 1000,
|
||||
MaxIdleConnsPerHost: 2,
|
||||
IdleConnTimeout: 30 * time.Second,
|
||||
DisableKeepAlives: false,
|
||||
MaxIdleConns: 0,
|
||||
MaxIdleConnsPerHost: 0,
|
||||
DisableKeepAlives: true,
|
||||
DialContext: (&net.Dialer{
|
||||
Timeout: 5 * time.Second,
|
||||
KeepAlive: 30 * time.Second,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue