Skip to content

Commit

Permalink
fix: Disable keep-alive for HTTPS connection to Git (#3531)
Browse files Browse the repository at this point in the history
  • Loading branch information
jannfis authored May 1, 2020
1 parent 1b0421c commit 3df4850
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions util/git/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
Expand All @@ -172,6 +174,7 @@ func GetRepoHTTPClient(repoURL string, insecure bool, creds Creds) *http.Client
TLSClientConfig: &tls.Config{
GetClientCertificate: clientCertFunc,
},
DisableKeepAlives: true,
}
}
}
Expand Down

0 comments on commit 3df4850

Please sign in to comment.