Commit 01507b9a authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net: fix Windows build

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5505048
parent a41006f3
......@@ -377,14 +377,6 @@ func (fd *netFD) CloseWrite() error {
return fd.shutdown(syscall.SHUT_WR)
}
type timeoutError struct{}
func (e *timeoutError) Error() string { return "i/o timeout" }
func (e *timeoutError) Timeout() bool { return true }
func (e *timeoutError) Temporary() bool { return true }
var errTimeout error = &timeoutError{}
func (fd *netFD) Read(p []byte) (n int, err error) {
if fd == nil {
return 0, os.EINVAL
......
......@@ -157,6 +157,14 @@ func (e *OpError) Timeout() bool {
return ok && t.Timeout()
}
type timeoutError struct{}
func (e *timeoutError) Error() string { return "i/o timeout" }
func (e *timeoutError) Timeout() bool { return true }
func (e *timeoutError) Temporary() bool { return true }
var errTimeout error = &timeoutError{}
type AddrError struct {
Err string
Addr string
......
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