Skip to content

Commit

Permalink
syscall: mark ECONNRESET, ECONNABORTED as temporary network errors
Browse files Browse the repository at this point in the history
Fixes #6163.

LGTM=adg
R=golang-codereviews, adg, dvyukov
CC=golang-codereviews
https://golang.org/cl/141600043
  • Loading branch information
rsc committed Sep 19, 2014
1 parent 88d53dd commit a07a57b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/syscall/syscall_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a07a57b

Please sign in to comment.