mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 06:32:32 +00:00
Fix mislooping in ssh.go. Add retries to AddSSHKeys.
This commit is contained in:
@@ -223,11 +223,12 @@ func MakeSSHTunnels(user, keyfile string, addresses []string) (SSHTunnelList, er
|
||||
}
|
||||
|
||||
func (l SSHTunnelList) Open() error {
|
||||
for ix := range l {
|
||||
for ix := 0; ix < len(l); ix++ {
|
||||
if err := l[ix].Tunnel.Open(); err != nil {
|
||||
// Remove a failed Open from the list.
|
||||
glog.Errorf("Failed to open tunnel %v: %v", l[ix], err)
|
||||
l = append(l[:ix], l[ix+1:]...)
|
||||
ix--
|
||||
}
|
||||
}
|
||||
if len(l) == 0 {
|
||||
|
Reference in New Issue
Block a user