From a07a57b00ec9fdd8f6b02360d39454859709d08a Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 18 Sep 2014 23:07:36 -0400 Subject: [PATCH] syscall: mark ECONNRESET, ECONNABORTED as temporary network errors Fixes #6163. LGTM=adg R=golang-codereviews, adg, dvyukov CC=golang-codereviews https://golang.org/cl/141600043 --- src/syscall/syscall_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/syscall/syscall_unix.go b/src/syscall/syscall_unix.go index f18dfca5e61d9..a06bd7dd08325 100644 --- a/src/syscall/syscall_unix.go +++ b/src/syscall/syscall_unix.go @@ -109,7 +109,7 @@ func (e Errno) Error() string { } func (e Errno) Temporary() bool { - return e == EINTR || e == EMFILE || e.Timeout() + return e == EINTR || e == EMFILE || e == ECONNRESET || e == ECONNABORTED || e.Timeout() } func (e Errno) Timeout() bool {