1
0
mirror of https://github.com/golang/go synced 2024-11-23 08:30:05 -07:00

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
This commit is contained in:
Russ Cox 2014-09-18 23:07:36 -04:00
parent 88d53ddb17
commit a07a57b00e

View 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 {