Skip to content

Commit d8d4c6c

Browse files
committed
fix: Increase retry attempt count for SSH errors
1 parent 02fe015 commit d8d4c6c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/bridge/ssh.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func InitShellWithPassword(username, password, host, port string) (*ssh.Client,
3434
}
3535
return nil
3636
},
37-
retry.Attempts(5),
37+
retry.Attempts(20),
3838
retry.Delay(1*time.Second),
3939
)
4040

@@ -75,7 +75,7 @@ func InitShellWithCert(username, certificate, host, port string) (*ssh.Client, e
7575
}
7676
return nil
7777
},
78-
retry.Attempts(5),
78+
retry.Attempts(20),
7979
retry.Delay(1*time.Second),
8080
)
8181

@@ -107,7 +107,7 @@ func VerifySSH(username, password, host, port string) bool {
107107
}
108108
return nil
109109
},
110-
retry.Attempts(5),
110+
retry.Attempts(20),
111111
retry.Delay(1*time.Second),
112112
)
113113

@@ -145,7 +145,7 @@ func VerifySSHCertificate(username, certificate, host, port string) bool {
145145
}
146146
return nil
147147
},
148-
retry.Attempts(5),
148+
retry.Attempts(20),
149149
retry.Delay(1*time.Second),
150150
)
151151
if err != nil {

internal/bridge/ssh_tunnel.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (t *Tunnel) bindTunnel(ctx context.Context, wg *sync.WaitGroup) {
8787
}
8888
return nil
8989
},
90-
retry.Attempts(5),
90+
retry.Attempts(20),
9191
retry.Delay(1*time.Second),
9292
)
9393

@@ -198,7 +198,7 @@ func (t *Tunnel) dialTunnel(ctx context.Context, wg *sync.WaitGroup, client *ssh
198198
}
199199
return nil
200200
},
201-
retry.Attempts(5),
201+
retry.Attempts(20),
202202
retry.Delay(1*time.Second),
203203
)
204204
if err != nil {

0 commit comments

Comments
 (0)