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>
diff --git a/buildlet/buildletclient.go b/buildlet/buildletclient.go
index bd9198b..25b4fb4 100644
--- a/buildlet/buildletclient.go
+++ b/buildlet/buildletclient.go
@@ -774,7 +774,7 @@
// 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 {