Commit e105eec9 authored by Yu-Ju Hong's avatar Yu-Ju Hong

Disable keep-alive for SSH tunnel health checks

We don't reuse the http client. Disabling the keep-alive to properly close the connections.
parent c41c24fb
...@@ -364,6 +364,9 @@ func (l *SSHTunnelList) healthCheck(e sshTunnelEntry) error { ...@@ -364,6 +364,9 @@ func (l *SSHTunnelList) healthCheck(e sshTunnelEntry) error {
Dial: e.Tunnel.Dial, Dial: e.Tunnel.Dial,
// TODO(cjcullen): Plumb real TLS options through. // TODO(cjcullen): Plumb real TLS options through.
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
// We don't reuse the clients, so disable the keep-alive to properly
// close the connection.
DisableKeepAlives: true,
}) })
client := &http.Client{Transport: transport} client := &http.Client{Transport: transport}
resp, err := client.Get(l.healthCheckURL.String()) resp, err := client.Get(l.healthCheckURL.String())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment