From: Mateusz Poliwczak Date: Wed, 26 Feb 2025 16:31:58 +0000 (+0000) Subject: net: return proper error from Context X-Git-Tag: go1.25rc1~891 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c55c1cbd04ca42c70adadc86e1f48f3678be10cc;p=gostls13.git 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 LUCI-TryBot-Result: Go LUCI Reviewed-by: Damien Neil Reviewed-by: Ian Lance Taylor Commit-Queue: Ian Lance Taylor --- diff --git a/src/net/lookup_plan9.go b/src/net/lookup_plan9.go index 0e179d31df..c9bab29ade 100644 --- a/src/net/lookup_plan9.go +++ b/src/net/lookup_plan9.go @@ -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()) } }