cloudproxy: agent: more verbose log for ssh connect failure

This commit is contained in:
Yousong Zhou
2021-05-07 19:43:15 +08:00
parent 2cfdb0a08a
commit 20f04d2fc5
+3 -2
View File
@@ -186,10 +186,11 @@ func (c *Client) runClientState(ctx context.Context, sshClientC chan *ssh.Client
default:
}
cc := c.cc
tmoCtx, _ := context.WithTimeout(ctx, 31*time.Second)
sshc, err := c.cc.ConnectContext(tmoCtx)
sshc, err := cc.ConnectContext(tmoCtx)
if err != nil {
log.Errorf("ssh connect: %v", err)
log.Errorf("ssh connect: %s@%s, port %d: %v", cc.Username, cc.Host, cc.Port, err)
waitTmo := time.NewTimer(13 * time.Second)
select {
case <-ctx.Done():