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.
|
// httpTransport is shared across all goroutines for connection pooling and TLS session reuse.
|
||||||
var httpTransport = &http.Transport{
|
var httpTransport = &http.Transport{
|
||||||
MaxIdleConns: 1000,
|
MaxIdleConns: 0,
|
||||||
MaxIdleConnsPerHost: 2,
|
MaxIdleConnsPerHost: 0,
|
||||||
IdleConnTimeout: 30 * time.Second,
|
DisableKeepAlives: true,
|
||||||
DisableKeepAlives: false,
|
|
||||||
DialContext: (&net.Dialer{
|
DialContext: (&net.Dialer{
|
||||||
Timeout: 5 * time.Second,
|
Timeout: 5 * time.Second,
|
||||||
KeepAlive: 30 * time.Second,
|
KeepAlive: 30 * time.Second,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue