1
0
mirror of https://github.com/golang/go synced 2024-11-20 05:44:44 -07:00

net: *netFD.Read to return os.EOF on eof (fixes windows build)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4210041
This commit is contained in:
Alex Brainman 2011-02-24 10:17:45 +11:00
parent c7978584c3
commit 162d510d7e

View File

@ -318,7 +318,7 @@ func (fd *netFD) Read(buf []byte) (n int, err os.Error) {
o.Init(fd, buf)
n, err = iosrv.ExecIO(&o, fd.rdeadline_delta)
if err == nil && n == 0 {
err = &OpError{o.Name(), o.fd.net, o.fd.laddr, os.EOF}
err = os.EOF
}
return
}