mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-06 21:52:54 +08:00
cloudproxy: agent: wait a while on connect error
This commit is contained in:
@@ -190,6 +190,12 @@ func (c *Client) runClientState(ctx context.Context, sshClientC chan *ssh.Client
|
||||
sshc, err := c.cc.ConnectContext(tmoCtx)
|
||||
if err != nil {
|
||||
log.Errorf("ssh connect: %v", err)
|
||||
waitTmo := time.NewTimer(13 * time.Second)
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case <-waitTmo.C:
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user