From 484715876358dc7dce6a29babe77a1504e03a050 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 8 May 2019 16:22:46 +0000 Subject: [PATCH] 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 --- buildlet/buildletclient.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildlet/buildletclient.go b/buildlet/buildletclient.go index bd9198b0..25b4fb4c 100644 --- a/buildlet/buildletclient.go +++ b/buildlet/buildletclient.go @@ -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 // 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) { - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) defer cancel() conn, err := c.getDialer()(ctx) if err != nil {