Skip to content

Commit 9bcb250

Browse files
author
Dean Karn
authored
Add EPIPE to retryable errors (#16)
1 parent 890c3c8 commit 9bcb250

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pkg
22

3-
![Project status](https://img.shields.io/badge/version-5.7.0-green.svg)
3+
![Project status](https://img.shields.io/badge/version-5.8.0-green.svg)
44
[![Build Status](https://travis-ci.org/go-playground/pkg.svg?branch=master)](https://travis-ci.org/go-playground/pkg)
55
[![Coverage Status](https://coveralls.io/repos/github/go-playground/pkg/badge.svg?branch=master)](https://coveralls.io/github/go-playground/pkg?branch=master)
66
[![GoDoc](https://godoc.org/github.com/go-playground/pkg?status.svg)](https://pkg.go.dev/mod/github.com/go-playground/pkg/v5)

errors/retryable.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ func IsTemporaryConnection(err error) (retryType string, isRetryable bool) {
8484
if errors.Is(err, syscall.EINTR) {
8585
return "eintr", true
8686
}
87+
if errors.Is(err, syscall.EPIPE) {
88+
return "epipe", true
89+
}
8790
}
8891
return "", false
8992
}

0 commit comments

Comments
 (0)