mirror of
https://github.com/golang/go.git
synced 2026-04-02 09:20:29 +09:00
The io.Reader contract requires that Read methods return io.EOF directly instead of wrapping it in another error. Currently UnixConn.ReadFromUnix, ReadFrom, and ReadMsgUnix wrap io.EOF inside net.OpError, causing callers checking for io.EOF to fail. Fix by avoiding wrapping when err == io.EOF. Fixes #78137 Change-Id: Ibb4e67cfb4c727c668ad79d1fb9e205f9b7e1903 Reviewed-on: https://go-review.googlesource.com/c/go/+/754960 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Nicholas Husin <nsh@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Basavaraj P <basavarajbankolli76@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Auto-Submit: Nicholas Husin <nsh@golang.org>
130 B
130 B
net: UnixConn read methods now return io.EOF directly instead of wrapping it in net.OpError when the underlying read returns EOF.