buildlet: increase SSH connect timeout

5 seconds is too slow on linux-arm it seems (starting sshd,
conditionally creating a host key, etc)

Change-Id: I2015908eb892d0b2dd580db8ba96c10726502cbb
Reviewed-on: https://go-review.googlesource.com/c/build/+/175998
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Brad Fitzpatrick 2019-05-08 16:22:46 +00:00
Родитель 310754d993
Коммит 4847158763
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -774,7 +774,7 @@ func (c *Client) dialWithNetDial(ctx context.Context) (net.Conn, error) {
// The authorizedPubKey must be a line from an ~/.ssh/authorized_keys file // The authorizedPubKey must be a line from an ~/.ssh/authorized_keys file
// and correspond to the private key to be used to communicate over the net.Conn. // and correspond to the private key to be used to communicate over the net.Conn.
func (c *Client) ConnectSSH(user, authorizedPubKey string) (net.Conn, error) { func (c *Client) ConnectSSH(user, authorizedPubKey string) (net.Conn, error) {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
defer cancel() defer cancel()
conn, err := c.getDialer()(ctx) conn, err := c.getDialer()(ctx)
if err != nil { if err != nil {