mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 00:34:10 -04:00
Fix goroutine leak in ssh-tunnel healthcheck.
This commit is contained in:
parent
4638f2f355
commit
cba5e84fd1
1 changed files with 6 additions and 2 deletions
|
|
@ -362,8 +362,12 @@ func (l *SSHTunnelList) healthCheck(e sshTunnelEntry) error {
|
|||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
})
|
||||
client := &http.Client{Transport: transport}
|
||||
_, err := client.Get(l.healthCheckURL.String())
|
||||
return err
|
||||
resp, err := client.Get(l.healthCheckURL.String())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
resp.Body.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *SSHTunnelList) removeAndReAdd(e sshTunnelEntry) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue