mirror of
https://github.com/golang/go
synced 2024-11-21 22:34:48 -07:00
net: fix Windows build
R=golang-dev, r CC=golang-dev https://golang.org/cl/5505048
This commit is contained in:
parent
a41006f35a
commit
01507b9ad1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user