cloudproxy: agent: wait a while on connect error

This commit is contained in:
Yousong Zhou
2021-05-07 19:43:15 +08:00
parent 92a4bebb2e
commit 2cfdb0a08a
+6
View File
@@ -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
}