Skip to content

Commit 03d451a

Browse files
committed
cmd/buildlet/stage0: support building with Go 1.8 again
While debugging a potential Go 1.9 windows networking crash, revert the use of Go 1.9's Time.Duration so we can still build for Go 1.8. Updates golang/go#21153 Change-Id: I4845910cd0ef376d4891a1802b0c9bcb8f7c5a0a Reviewed-on: https://go-review.googlesource.com/51171 Reviewed-by: Sarah Adams <[email protected]>
1 parent 81725e0 commit 03d451a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/buildlet/stage0/stage0.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ func awaitNetwork() bool {
184184
}
185185
failAfter := time.Since(t0)
186186
if now := time.Now(); now.After(lastSpam.Add(5 * time.Second)) {
187-
log.Printf("network still down; probe failure took %v", failAfter.Round(time.Second/10))
187+
const round = time.Second / 10
188+
log.Printf("network still down; probe failure took %v", failAfter/round*round)
188189
lastSpam = now
189190
}
190191
time.Sleep(1 * time.Second)

0 commit comments

Comments
 (0)