tracker/http/client.go | 7 ++++--- diff --git a/tracker/http/client.go b/tracker/http/client.go index 30db36917ffdb26cbec5106b512d85ba2e4fb473..d0c27a023e8ec7e2496ae517c96702e797f979ca 100644 --- a/tracker/http/client.go +++ b/tracker/http/client.go @@ -14,8 +14,9 @@ type ProxyFunc func(*http.Request) (*url.URL, error) type NewClientOpts struct { - Proxy ProxyFunc - ServerName string + Proxy ProxyFunc + ServerName string + AllowKeepAlive bool } func NewClient(url_ *url.URL, opts NewClientOpts) Client { @@ -29,7 +30,7 @@ InsecureSkipVerify: true, ServerName: opts.ServerName, }, // This is for S3 trackers that hold connections open. - DisableKeepAlives: true, + DisableKeepAlives: !opts.AllowKeepAlive, }, }, }