mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
net: return proper error from Context
Sadly err was a named parameter so this did not cause compile error. Fixes #71974 Change-Id: I10cf29ae14c52d48a793c9a6cb01b01d79b1b356 GitHub-Last-Rev: 4dc0e6670a9265612b8ec26dbc378219b25156b4 GitHub-Pull-Request: golang/go#71976 Reviewed-on: https://go-review.googlesource.com/c/go/+/652815 Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Commit-Queue: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
9cceaf8736
commit
c55c1cbd04
@ -65,7 +65,7 @@ func query(ctx context.Context, filename, query string, bufSize int) (addrs []st
|
|||||||
case r := <-ch:
|
case r := <-ch:
|
||||||
return r.addrs, r.err
|
return r.addrs, r.err
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return nil, mapErr(err)
|
return nil, mapErr(ctx.Err())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user