mirror of
https://github.com/golang/go
synced 2025-05-22 05:48:03 +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: 4dc0e6670a
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:
committed by
Gopher Robot
parent
9cceaf8736
commit
c55c1cbd04
@ -65,7 +65,7 @@ func query(ctx context.Context, filename, query string, bufSize int) (addrs []st
|
||||
case r := <-ch:
|
||||
return r.addrs, r.err
|
||||
case <-ctx.Done():
|
||||
return nil, mapErr(err)
|
||||
return nil, mapErr(ctx.Err())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user