Commit 42dd7a6d authored by Alex Brainman's avatar Alex Brainman Committed by Russ Cox

net(windows): properly handle EOF in (*netFD).Read().

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1848045
parent 0decedf6
......@@ -232,6 +232,9 @@ func (fd *netFD) Read(p []byte) (n int, err os.Error) {
err = &OpError{"WSARecv", fd.net, fd.laddr, os.Errno(r.errno)}
}
n = int(r.qty)
if err == nil && n == 0 {
err = os.EOF
}
return
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment