Skip to content

Commit

Permalink
fix leaking TCP connections in conformance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravkghildiyal committed Aug 28, 2023
1 parent d54f5ee commit ddd0fd2
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 ddd0fd2

Please sign in to comment.