Skip to content

Commit

Permalink
Merge pull request #2358 from gauravkghildiyal/tcp-leaks
Browse files Browse the repository at this point in the history
fix leaking TCP connections which leads to consistent conformance test failures
  • Loading branch information
k8s-ci-robot authored Aug 28, 2023
2 parents 4f8e572 + ddd0fd2 commit 2ed9486
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions conformance/utils/roundtripper/roundtripper.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ func (d *DefaultRoundTripper) CaptureRoundTrip(request Request) (*CapturedReques

transport := &http.Transport{
DialContext: d.CustomDialContext,
// We disable keep-alives so that we don't leak established TCP connections.
// Leaking TCP connections is bad because we could eventually hit the
// threshold of maximum number of open TCP connections to a specific
// destination. Keep-alives are not presently utilized so disabling this has
// no adverse affect.
//
// Ref. https://github.com/kubernetes-sigs/gateway-api/issues/2357
DisableKeepAlives: true,
}
if request.Server != "" && len(request.CertPem) != 0 && len(request.KeyPem) != 0 {
tlsConfig, err := tlsClientConfig(request.Server, request.CertPem, request.KeyPem)
Expand Down

0 comments on commit 2ed9486

Please sign in to comment.