aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Strasheim <fullung@gmail.com>2011-01-31 14:54:58 -0500
committerRuss Cox <rsc@golang.org>2011-01-31 14:54:58 -0500
commit161f109cad49f0fb8aa0cc8e7c53477247bb1144 (patch)
treed110574a082fbaedee00ec125c908e886d65e27f
parent76130bdeeacc5d6d78102b4cbb6e0f110a812eb4 (diff)
downloadgo-161f109cad49f0fb8aa0cc8e7c53477247bb1144.tar.gz
go-161f109cad49f0fb8aa0cc8e7c53477247bb1144.zip
os: add ETIMEDOUT
R=rsc CC=golang-dev https://golang.org/cl/4017045
-rw-r--r--src/pkg/os/error.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/os/error.go b/src/pkg/os/error.go
index 8cdf532548..4738d1a424 100644
--- a/src/pkg/os/error.go
+++ b/src/pkg/os/error.go
@@ -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.
@@ -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.