From 3df4850418118ac1bf4945a59fca6f345b53c4d7 Mon Sep 17 00:00:00 2001 From: jannfis Date: Fri, 1 May 2020 19:56:25 +0200 Subject: [PATCH] fix: Disable keep-alive for HTTPS connection to Git (#3531) --- util/git/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/git/client.go b/util/git/client.go index a28f29325e..847319c979 100644 --- a/util/git/client.go +++ b/util/git/client.go @@ -147,6 +147,7 @@ func GetRepoHTTPClient(repoURL string, insecure bool, creds Creds) *http.Client InsecureSkipVerify: true, GetClientCertificate: clientCertFunc, }, + DisableKeepAlives: true, } } else { parsedURL, err := url.Parse(repoURL) @@ -164,6 +165,7 @@ func GetRepoHTTPClient(repoURL string, insecure bool, creds Creds) *http.Client RootCAs: certPool, GetClientCertificate: clientCertFunc, }, + DisableKeepAlives: true, } } else { // else no custom certificate stored. @@ -172,6 +174,7 @@ func GetRepoHTTPClient(repoURL string, insecure bool, creds Creds) *http.Client TLSClientConfig: &tls.Config{ GetClientCertificate: clientCertFunc, }, + DisableKeepAlives: true, } } }