Avoid connection leaking
An empty transport will by default keep connections alive indefinitely. Signed-off-by: Daniel Morsing <dmo@jetstack.io>
This commit is contained in:
parent
f72b59bee1
commit
dc8a4cb95e
@ -157,6 +157,9 @@ func testReachability(ctx context.Context, url string, key string) (bool, error)
|
|||||||
// TODO(dmo): figure out if we need to add a more specific timeout for
|
// TODO(dmo): figure out if we need to add a more specific timeout for
|
||||||
// individual checks
|
// individual checks
|
||||||
transport := &http.Transport{
|
transport := &http.Transport{
|
||||||
|
// we're only doing 1 request, make the code around this
|
||||||
|
// simpler by disabling keepalives
|
||||||
|
DisableKeepAlives: true,
|
||||||
TLSClientConfig: &tls.Config{
|
TLSClientConfig: &tls.Config{
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true,
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user