]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: mark ECONNRESET, ECONNABORTED as temporary network errors
authorRuss Cox <rsc@golang.org>
Fri, 19 Sep 2014 03:07:36 +0000 (23:07 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 19 Sep 2014 03:07:36 +0000 (23:07 -0400)
Fixes #6163.

LGTM=adg
R=golang-codereviews, adg, dvyukov
CC=golang-codereviews
https://golang.org/cl/141600043

src/syscall/syscall_unix.go

index f18dfca5e61d933a3179bfec27220f35a046b8a9..a06bd7dd083252ee1fc70bd9bbbabe5dce8c6b01 100644 (file)
@@ -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 {