fix CI tests to work with go 1.6; add another error message that was observed in CI

This commit is contained in:
Josh Humphries
2017-12-13 15:29:08 -05:00
parent 6c05311fb9
commit 91fb94b700
2 changed files with 3 additions and 2 deletions

View File

@@ -871,7 +871,7 @@ func BlockingDial(ctx context.Context, address string, creds credentials.Transpo
once.Do(func() { wg.Done() })
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
conn, err := (&net.Dialer{}).DialContext(ctx, "tcp", address)
conn, err := (&net.Dialer{Cancel: ctx.Done()}).Dial("tcp", address)
if err != nil {
writeResult(err)
return nil, err