buildlet: bump header timeout to 20 seconds
For consistency with "20 seconds" being chosen as an arbitrary timeout
for a network roundtrip and trivial processing in cmd/coordinator in
CL 406215, apply the same change to buildlet.
Change-Id: I889ff8b86d789a6763eb0a32b0ec40050020223e
Reviewed-on: https://go-review.googlesource.com/c/build/+/407554
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
diff --git a/buildlet/buildletclient.go b/buildlet/buildletclient.go
index 2ca30d4..bd352db 100644
--- a/buildlet/buildletclient.go
+++ b/buildlet/buildletclient.go
@@ -549,9 +549,9 @@
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
// The first thing the buildlet's exec handler does is flush the headers, so
- // 10 seconds should be plenty of time, regardless of where on the planet
- // (Atlanta, Paris, etc) the reverse buildlet is:
- res, err := c.doHeaderTimeout(req, 10*time.Second)
+ // 20 seconds should be plenty of time, regardless of where on the planet
+ // (Atlanta, Paris, Sydney, etc.) the reverse buildlet is:
+ res, err := c.doHeaderTimeout(req, 20*time.Second)
if err == errHeaderTimeout {
c.MarkBroken()
return nil, errors.New("buildlet: timeout waiting for exec header response")
@@ -693,7 +693,7 @@
return Status{}, err
}
req = req.WithContext(ctx)
- resp, err := c.doHeaderTimeout(req, 10*time.Second) // plenty of time
+ resp, err := c.doHeaderTimeout(req, 20*time.Second) // plenty of time
if err != nil {
return Status{}, err
}
@@ -719,7 +719,7 @@
return "", err
}
req = req.WithContext(ctx)
- resp, err := c.doHeaderTimeout(req, 10*time.Second) // plenty of time
+ resp, err := c.doHeaderTimeout(req, 20*time.Second) // plenty of time
if err != nil {
return "", err
}