Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Commit

Permalink
os: add ETIMEDOUT
Browse files Browse the repository at this point in the history
R=rsc
CC=golang-dev
https://golang.org/cl/4017045
  • Loading branch information
alberts authored and rsc committed Jan 31, 2011
1 parent 76130bd commit 161f109
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pkg/os/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (e Errno) Temporary() bool {
}

func (e Errno) Timeout() bool {
return e == Errno(syscall.EAGAIN) || e == Errno(syscall.EWOULDBLOCK)
return e == Errno(syscall.EAGAIN) || e == Errno(syscall.EWOULDBLOCK) || e == Errno(syscall.ETIMEDOUT)
}

// Commonly known Unix errors.
Expand Down Expand Up @@ -79,6 +79,7 @@ var (
ECONNREFUSED Error = Errno(syscall.ECONNREFUSED)
ENAMETOOLONG Error = Errno(syscall.ENAMETOOLONG)
EAFNOSUPPORT Error = Errno(syscall.EAFNOSUPPORT)
ETIMEDOUT Error = Errno(syscall.ETIMEDOUT)
)

// PathError records an error and the operation and file path that caused it.
Expand Down

0 comments on commit 161f109

Please sign in to comment.